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 CCS Technical Support

RS232 problem

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



Joined: 21 Oct 2010
Posts: 85

View user's profile Send private message

RS232 problem
PostPosted: Wed Jun 08, 2011 2:28 pm     Reply with quote

Hello,

I have use the ex_usb_serial sample and connect the pc with usb and a Simcom SIM900B Module on the serial port from the PIC 18F2550.

My problem is that PIC don't detect the return signals from the SIM900B Module every time. I pass through the answer from the SIM900B Module to the usb interface. Sometimes it works and sometimes not.

The instructions to the SIM900B from the pic works perfectly. I can switch a beeper on the SIM900B module every time over the RS232 from the pic. But the answers from the module are working for a time and then in the middle of the connection, no answers come on the PC, the other direction works at this time. And if I put characters from the PIC with usb_cdc_putc at this time, this also working! I think the problem is on the connection between TX from the module and RX from PIC?!

So i have tried to connect the PIC with USB and RS232 on my PC, works. Then I have connected the SIM900B module on a serial Port on my PC works.
I use a MAX232 in the serial interface line as level converter.

Between the PIC and the Module are no level shifter. The signals are between 0V and 2.8V from the module to the PIC. VDD is same at module and PIC.

When I connect a logic analyser, I can see the answers from the module!

Has anybody an Idea? Are the 2.8V as high level too little??

Thank
Volker
Ttelmah



Joined: 11 Mar 2010
Posts: 19520

View user's profile Send private message

PostPosted: Wed Jun 08, 2011 2:43 pm     Reply with quote

Yes.
The RS232 input, has a Schmitt input gate. requires the signal to go to 0.8* the supply voltage (so 4v if using a 5v supply), to be seen as a 'high'. You'll probably find simply adding a pull up resistor to 5v on this signal line (perhaps 4K7), will bring the signal high enough to be seen by the PIC.

Best Wishes
Prefekt



Joined: 21 Oct 2010
Posts: 85

View user's profile Send private message

PostPosted: Thu Jun 09, 2011 11:54 am     Reply with quote

Hello,

thank for the tip! But the resistor brings no improvment. But I think this is the problem. So I have order a levelshifter (NC7WZ07). I hope It will work with this!

Best regards
Volker
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