| ??? 05/16/05 21:56 Read: times |
#93506 - setting SFR registers |
Hi
I new to this world of microcontrollers but have succeeded in building a pcb using a 87c52 with external eprom and sram which will flash a LED. Now I'm on to trying to get the serial port up and running in a polled mode and have done alot of reading about these sfr registers: SCON,TCON,and TMOD as well as the TH1,TI and RI bits I have selected a 11.0592mhz crystal which according to my calculations gives a even number of 250 to set the baud rate at 9600 with. My serial_init function looks like this: SCON=0x50; TMOD=0x11; TCON=0x52; TH1=250 TI=1; RI=0; Since this doesn't work I'm looking for advice as to why not. I'm writing the above in C. Any reason why I shouldn't. What am I missing Thanks Jim |
| Topic | Author | Date |
| setting SFR registers | 01/01/70 00:00 | |
| A couple of things. | 01/01/70 00:00 | |
| Change it to C! | 01/01/70 00:00 | |
| why | 01/01/70 00:00 | |
| but it already is C!! | 01/01/70 00:00 | |
| Mehdi probably meant: | 01/01/70 00:00 | |
| Yes Jan | 01/01/70 00:00 | |
| Baud rate | 01/01/70 00:00 | |
*what* doesn't work? | 01/01/70 00:00 |



