|
|
View previous topic :: View next topic |
Author |
Message |
Zer0flag Guest
|
Strange problem with high baud rates |
Posted: Tue Jan 01, 2008 9:21 am |
|
|
Hello and happy new year to everybody!
I am programming a PIC18F4620 device with RS232. I am not doing the electronics but the schematics show that the RS232 uses a MAX250CPD and a MAX251CPD as well as FTDI FT232BM for USB conversion.
The external clock of the PIC is at 20 Mhz and the received chars are handled through INT_RDA. I init the RS232 like this and just change the baud rate:
#use rs232(baud=9600, parity=N, bits=8, stop=1, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
For baud rates of 9600 and 19200 everythings works ok. Characters are received from the PC and sent to the PC correctly without problems. But as soon as I switch to 38400 the characters received by the PIC are mixed up and echoed back as wrong characters. Strangely, sending chars from the PIC to the PC still works correct for 38400. As soon as I switch to 57600 the received and sent chars get corrupted.
Do you have any ideas where the problem may be? I checked the PIC registers but the baud rates seem to be configured correctly by the CCS compiler. Thank you in advance.
Best regards,
Zer0flag |
|
|
Zer0flag Guest
|
Maybe this is the answer |
Posted: Tue Jan 01, 2008 12:45 pm |
|
|
Update: I found the following description on the Maxim website, maybe this is where my problem comes from and why I can use only 19.2k baud:
Quote: | The MAX250 and MAX251 chip set form the heart of a complete, electronically isolated, RS-232 dual transmitter/receiver. By combining many functions on two chips, the cost and complexity required for an isolated digital interface is greatly reduced. Four low cost optocouplers, four capacitors, a diode and a small pot-core type transformer are all that are required to complete a 19.2k baud transceiver. Faster data rates are possible by using high speed optocouplers. |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|