View previous topic :: View next topic |
Author |
Message |
Prefekt
Joined: 21 Oct 2010 Posts: 85
|
RS232 problem |
Posted: Wed Jun 08, 2011 2:28 pm |
|
|
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
|
|
Posted: Wed Jun 08, 2011 2:43 pm |
|
|
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
|
|
Posted: Thu Jun 09, 2011 11:54 am |
|
|
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 |
|
|
|