Greetings I have been working with pic basic pro. I am trying to receive serial data sent by my basic stamp. This data is supposed to represent the humidity and temperature. Eventually I will set up my circuit with a rf module, but right now I am trying to get it to work with just a wire connecting my pic and my basic stamp.
My stamp is sending a Serout command.
My pic is set to receive on Serin2.
My problem is it doesn't seem to matter what the baud mode or baud rate is. I always seem to get the same results.
For example I tried to send 70 on my basic stamp. The hex value for this is 46. The pic sort of receives this but it seems to have added a 1 infront of the number.
After testing my serout command with my digital scope I confirmed that when I serout 70 the hex value 46 is sent out just like it is supposed to. The binary for 46 is 0100 0110. When My pic receives this value it seems to always have a 1 infront of the binary number and the whole binary number seems to get shifted to the right. The pic gets the value 1010 0110 (A6 instead of 46). I am not sure what causes this but regardless of what i send this 1 is always the most significant bit of the byte recieved. I have tried inverted mode ture mode, open drain, and about every other configuration I can think of.
My goal if it is possible is to send a tempature byte which represents the temp, a a humidity byte which represents the humidity. I want to do this using one serout command from my basic stamp, and a serin2 command on the pic.
Any suggestions would be appreciated
Thanks
Micah
Bookmarks