??? 02/05/05 07:42 Read: times |
#86609 - Circuit Details of Led's Responding to: ???'s previous message |
Hi,
I have connected red Led's to p1.0 to P1.7.A resistance of 270 Ohms is connected on everey led in this way.Cathode of led to resistance and then resistance to port pin.anode of every led to Vcc 5 volts. I have done the above on p1.0-p1.7 I am using 12 Mhz crystal,Max232 for serial port.The communication is taking place.But if at a time more than 6 leds cannot be turned on.if i do so all turn off or the controller hangs.Then i have to reset it. controller code baudnum equ 0f3h ;no loaded in th1 for 2403.8 baud org 0000h anl pcon,#7fh ; set smod bit to 0 for baud*32 rate anl tmod,#30h ;alter timer t1 config only orl tmod,#20h ;set timer t1 as 8 bit auto reload mov th1,#baudnum ;th1 set for divide clock by 13d setb tr1 ;t1 running at 1e6/13=76923Hz mov scon,#40h ;uart mode 1 setb ren ;for recving enable ren bit here: jbc ri,receive ;loop until char recd sjmp here ;poll ri again receive: clr ri ;clr ri to prevent false read mov a,sbuf ;sbuf gets val like 1h if p1.0 is to be lit up,if p1.0 and p1.1 has to be lit up the it will get 3h,if p1.0,p1.1,p1.2 has to be lit up sbuf will have 7h.for p1.0 to p1.3 sbuf will have 15h and so on cpl a mov p1,a sjmp here end |
Topic | Author | Date |
required AT89c2051 help on leds | 01/01/70 00:00 | |
P1.0 and P1.1 input only | 01/01/70 00:00 | |
Ignore earlier post | 01/01/70 00:00 | |
trying to understand | 01/01/70 00:00 | |
oh, by the way re posting code | 01/01/70 00:00 | |
Check the datasheet | 01/01/70 00:00 | |
to much | 01/01/70 00:00 | |
Circuit Details of Led's | 01/01/70 00:00 | |
to much for all | 01/01/70 00:00 | |
3rd way | 01/01/70 00:00 | |
Solution works![]() | 01/01/70 00:00 | |
ASCII schematic of Peter Herbst solution | 01/01/70 00:00 |