If somebody wants to control a Picaxe 08 over the download pin it can be done as follows.
If you just want to sent a command
If you want to pass variables
It seems while the serin code parses the input for the string the bootloader is disabled.
This is why if you use this method you cannot download a program while the code waits in serin.
Drawbacks:
The trick works for sure on picaxe08 firmware version 4.3.
08M behaves erratically and needs further investigation.
I suggest you USE A PAUSE 2000 command in the beginning of the code if you will use this trick!!!
This way even if you will have a looped serin you will be able to reprogram the chip on power on during the 2 sec pause.
Good luck
If you just want to sent a command
Code:
serin 5,N2400,("CMD") ' "CMD" can be of any length
Code:
serin 5,N2400,("1234"),b8 ' "1234" must have not less than 4 chars
This is why if you use this method you cannot download a program while the code waits in serin.
Drawbacks:
- You cannot download while in serin.
- If you sent something to the port while not in serin you enable the bootloader and reset the program getting garbage on output 0.
- But you can exploit that last as a reset feature over the serial
The trick works for sure on picaxe08 firmware version 4.3.
08M behaves erratically and needs further investigation.
I suggest you USE A PAUSE 2000 command in the beginning of the code if you will use this trick!!!
This way even if you will have a looped serin you will be able to reprogram the chip on power on during the 2 sec pause.
Good luck
Last edited: