Shop OBEX P1 Docs P2 Docs Learn Events
FullDuplexSerial and stop bits (connecting a C328 jpeg camera to the Propeller — Parallax Forums

FullDuplexSerial and stop bits (connecting a C328 jpeg camera to the Propeller

Paul VossPaul Voss Posts: 13
edited 2008-07-09 21:10 in Propeller 1
I've run into a challenge with FullDuplexSerial and thought someone on the forum would have some good advice. I want to connect a small jpeg camera (C328R) to a Propeller chip for an upcoming research balloon flight (to track a volcanic plume in Hawaii). I've run into some difficulty with the serial communication - FullDuplexSerial seems appears to set two stop bits at the end of each byte whereas the camera I have expects just one stop bit. The camera does not recognixe the serial stream I'm sending from the Propeller ($AA_0D_00_00_00) but it does recognize a nearly identical stream from an evaluation board that differs only by having one less stop bit (both signals were checked on a scope).

I would most appreciate any thoughts on how to rectify this issue and if the extra stop bit seems like a possible cause for the failed communication. Also, if anyone has used the C328R with the propeller chip and want's to share any advice or code, this will be a great application for your hard work!

Paul

Comments

  • RaymanRayman Posts: 14,233
    edited 2008-07-09 19:02
  • TimmooreTimmoore Posts: 1,031
    edited 2008-07-09 19:03
    I am pretty sure fullduplex sends 1 stop bit. It sends the following sequence 10........1 where . is the bits to b sent. the 10 is the start bit and the trailing 1 is the stop bit. I would look at 2 things. Does hte camera require parity? Also I have found fullduplex needs an accurate baudrate for receive. It could be the camera is receiving the commands but you are not receiving responses. Try changing the baudrate around the badurate e.g. if the baudrate is 115200 try 116500. I found this with a different camera - cmucam3
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-07-09 20:56
    I find it surprising that a serial receiver would reject a byte with an extra stop bit. Since the idle time between bytes is the same level as a stop bit, and the next byte is synchronized on the start bit, the receiver should be able to allow any number of stop bits. Just seems to me that too many stop bits wouldn't be the problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • grasshoppergrasshopper Posts: 438
    edited 2008-07-09 21:10
    I would have to agree with Ken. Perhaps you can check the mode in the FullDuplex object. I see from the data sheet that the baud is auto detected so that may or may net be a problem. Also it may help if you post some small code for us to look at. It may point to the problem. Also are you using a RS232 transicever?


    Good luck

    Post Edited (grasshopper) : 7/9/2008 9:15:35 PM GMT
Sign In or Register to comment.