I have two 40X's talking to each other via two wires (common ground and serial line set up as per hippy's website) They are running happily of a wall wart and 7805 combo. They each have there own chip supplied by the wall wart (12V). When they are working they will be on different power supplies (hence the common GND line). I also have an LED across the serial line to GND to show the communication).
Attached is the code. Both pieces are long, but there is just one bit that needs zoning in on. In the "Display" code, it is line 326 and in "target empiler" is is the interrupt.
The communication should go like this:
"Display" sends a pulse (line 329) to interrupt the "target".
The "target" reads the serial data sent by the display. If this data = "1" then it sends a "1" back.
The target reads the "1" and knows the system has worked. (It then returns to do a whole load of irrelevant stuff.
As you can see I have put a debug in each code (only one in each). The "target" is showing that b0 = "1" at it's debug, so it must then be sending a "1" back (I can identify this flash on the LED). The debug from the "display" is reading as " " (space, or 32). The display is obviously receiving some data, otherwise it would timeout and there would be no debug sent. I am just completely foxed as to why is is receiving a " " from the "target". If I change line 10 in the target code to anything but what it is, the debug from the display shows nothing (however it is still debugging, so it must receive something).
I am using up to date Prog Ed on windows XP. This communication was working on the breadboard. I then moved the display to a PCB and it communicated with the breadboard. I then moved the target, and it stopped. I then changed the target and it started working as it is (had to change the code from the original to get it this far though).
Any ideas what is causing the rouge " "?
Thanks in advance.
David.
Attached is the code. Both pieces are long, but there is just one bit that needs zoning in on. In the "Display" code, it is line 326 and in "target empiler" is is the interrupt.
The communication should go like this:
"Display" sends a pulse (line 329) to interrupt the "target".
The "target" reads the serial data sent by the display. If this data = "1" then it sends a "1" back.
The target reads the "1" and knows the system has worked. (It then returns to do a whole load of irrelevant stuff.
As you can see I have put a debug in each code (only one in each). The "target" is showing that b0 = "1" at it's debug, so it must then be sending a "1" back (I can identify this flash on the LED). The debug from the "display" is reading as " " (space, or 32). The display is obviously receiving some data, otherwise it would timeout and there would be no debug sent. I am just completely foxed as to why is is receiving a " " from the "target". If I change line 10 in the target code to anything but what it is, the debug from the display shows nothing (however it is still debugging, so it must receive something).
I am using up to date Prog Ed on windows XP. This communication was working on the breadboard. I then moved the display to a PCB and it communicated with the breadboard. I then moved the target, and it stopped. I then changed the target and it started working as it is (had to change the code from the original to get it this far though).
Any ideas what is causing the rouge " "?
Thanks in advance.
David.
Attachments
-
11.1 KB Views: 30
-
1.1 KB Views: 13