The idea of sending everything as an ascii is a very good idea. This way when you are sending a zero, you don't get 8 bits that do not change at all.
The basic stamp uses a pic microcontroller at its core. I am using the basic stamp to send serial data with the serout command. I am using the pic16f84 to receive the data with the serin2 (pic basic pro) command.
The problem I am having is if I use the basic stamp to serout a 1, which is 0000 0001, then for some reason the pic 16f84 will receive 1000 0001. I have verified with a digital scope that the basic stamp is sending out correct data with the its serial command. When I send a 2 with the serial command of the basic stamp. The pic 16f84 will receive 1000 0010. This same thing happends when I send out a 3 I get 1000 0011. But if I send out a 4 or any number higher the results get really random. I have tried many baud modes, such as true, inverted, open drain, driven, and this same thing keeps happening. I have even used many different baud rates, and I still get the same result.
I have read of others have this same problem. I have read of a person sending a 0, 1, 2, 3.... all the way to 100, and only about 30 percent of all the data send was received correctly. The guy that did this was using the serout2 and serin2 commands while using to pics which were exactly the same. I found another person who actually got it to work. They suggested that sometimes the compiler doesn't always get the timing of these commands worked out.
I have tried all the suggestions I have read about, and I am still stuck.
Bookmarks