#picaxe 14m2
#define simulate
dacsetup %10100000
do
daclevel 0
#ifdef simulate then
sertxd ("Set DAC to ",#0)
#endif
pause 2000
daclevel 3
#ifdef simulate then
sertxd ("Set DAC to ",#3)
#endif
pause 2000
daclevel 25
#ifdef simulate then
sertxd ("Set DAC to ",#25)
#endif
pause 2000
loop
It seems that you can't - when simulated the output is just high.
However, you can add sertxd to print stuff in the simulated terminal so you can see what value the DAC is at. Example:Remove '#define simulate' when you download the program on to an actual PICAXE.Code:#picaxe 14m2 #define simulate dacsetup %10100000 do daclevel 0 #ifdef simulate then sertxd ("Set DAC to ",#0) #endif pause 2000 daclevel 3 #ifdef simulate then sertxd ("Set DAC to ",#3) #endif pause 2000 daclevel 25 #ifdef simulate then sertxd ("Set DAC to ",#25) #endif pause 2000 loop
There seems no obvious reason that it shouldn't.Will this work with MacAXEPad?
Does MacAXEPad have a simulator now?Will this work with MacAXEPad?
No, only Programming Editor and Logicator provide simulation modes. I perhaps misunderstood IronJungle's question; the code will work, adding / removing '#define simulation' will include or remove the corresponding 'sertxd' commands, but there is no simulation ability with AXEpad.Does MacAXEPad have a simulator now?