??? 09/17/11 22:16 Read: times |
#183792 - Not the whole message! Responding to: ???'s previous message |
No, don't post the entire message as source code - just the source code!
Like this: Ralph should have said:
I been member of website since 2003 and usually don't ask for help, but maybe my gray matter is not as good since I am now in my 60's still trying to learn this 8051 chip. Any way here is text example. MOV TMOD,#10H ;timer 1, mode 1 (16-bit) AGAIN: MOV TL1,#34H ;TL1=34H,low byte of timer MOV TH1,#76H ;TH1=76H,HI byte ;(7634H=timer value) SETB TR1 ;start the timer1 BACK: JNB TF1,BACK stay till timer rolls over CLR TR1 ;stop timer 1 CPL P1.5 ;comp. p1.5 to get hi, lo CLR TF1 ;clear timer flag 1 SJMP AGAIN ;reload timer since mode 1 ;is not auto-reload All I am trying to do is make small change to this program so it outputs 2Hz square wave on p1.5 using TL1 and TH1. |