??? 05/26/10 22:02 Read: times |
#176208 - just leave them at the reset value ... Responding to: ???'s previous message |
I'm having trouble getting some serial port comms to work on a Dallas 80C320. There are a number of things that aren't 100% clear in 8052.COM's otherwise excellent tutorials.
1. In the "DS80C320 Tutorial: High-Speed Architecture" page it talks about controlling the timer modes with bits 3, 4 and 5 in the CKCON register, but bizarrely in the table just below this it refers to these bits as EDCON.3, EDCON.4 and EDCON.5. What is EDCON? I can't find any other reference to it. Are these actually bits CKCON.3, CKCON.4 and CKCON.5? just leave them at the reset value (making the chip behave 'biblical') then when you have communication, you can try what happens with the bits in the above SFRs. 2. In the "8051 Tutorial: Serial Communication" it explains how to set up baud rates for operating the serial port in mode 1 (8-bit UART). From this inforamtion it appears that using Timer 1 in 8-bit auto reload mode with an 11.0592MHz crystal I can achieve a maximum baud rate of 57,600 baud by setting a reload value of 0xFF in TH1, and by setting PCON.7 (SMOD) to 1. With these settings the timer will be clocked at 11.0592/12 MHz, and will overflow every time, so the baud rate will be 11.0592/(12*16) = 57,600 baud. But nowhere can I see specifically stated that on an 80C320, I can set CKCON.4 (which my assembler also calls T1M) to 1, and thereby have the timer increment every 4 oscillator cycles instead of 12, and thus get a baud rate three times faster. Is this correct? tutorials are rarely chip specific, thus this. 3. If I'm using Timer 2 in auto-reload mode to generate the baud rate for serial port 0, what is the correct formula for calculating the baud rate? So if my reload value in RCAP2L is 0xFA and in RCAP2H is 0xFF, and I'm using an 11.0592MHz crystal, and CKCON.5 is not set, and PCON.7 is not set, what is my baud rate? if you want to exercise your math skills, go ahead I use http://www.keil.com/c51/baudrate.asp Erik |
Topic | Author | Date |
80C320 Serial Port Baud Rates | 01/01/70 00:00 | |
a helpful link | 01/01/70 00:00 | |
Read this | 01/01/70 00:00 | |
Thanks | 01/01/70 00:00 | |
I'm getting there... | 01/01/70 00:00 | |
total gobbelygook![]() | 01/01/70 00:00 | |
just leave them at the reset value ... | 01/01/70 00:00 |