Help with Hserin/Hserout commands?
July 17, 2011
I have 2 Picaxe 28x1's that will need to communicate serially with one another while each performing tasks such as PWM, reading ADC, simple outputs. As I understand, the Hserin and Hserout pins/commands allow the Picaxes to recieve serial data in the background, store it somewhere, and read the stored data whenever necessary. I need Picaxe A to do tasks, and then send 2 variables to Picaxe B without interupting B's program flow. B needs to be able to look up the variable sent from A whenever necessary and continue on. How would I connect the 2 Hserin/Hserout pairs on each Picaxe? Pretend I want to send the variables b0 and b1 to Picaxe B, with b0 = 3 and b1 = 7, and wanted those to be stored in the background of B, ready to be read by B, what code would I need for Picaxe A and B? I am a complete beginner in serial communication with Picaxes, so the easier to understand, the better :)