CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Strange problem with high baud rates

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Zer0flag
Guest







Strange problem with high baud rates
PostPosted: Tue Jan 01, 2008 9:21 am     Reply with quote

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
PostPosted: Tue Jan 01, 2008 12:45 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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