Picaxe 28x1 To PC ANSI Emulator

Goeytex

Senior Member
I did this project yesterday and today as proof of concept for using a simple terminal emulator
to control a Picaxe with the Picaxe formatting and sending data to the Termina Screen.

It uses only the programming cable for a connection to the PC and the Terminal Emulator

I used Hyperterminal Private Edition 6.3 ( free download) because its free and because it has a macro
feature that can send control codes to the Picaxe with a keystroke .

A better choice for serious tasks would be Powerterm Lite (or Pro) because of its advanced programming
language where it can crunch numbers, save save data to disk and then telnet the data out to anywhere.

A 4 channel data logger would be no problem and you could save the data continuously to disk or transmit via
telnet in real time.

Read the attached files, load the program and try it ! It works pretty well.

This is a completed "demo" and is not perfect but it proved to me that it could this could be
done rather easily and can be quite useful for automation and other stuff.

Goey
 

Attachments

Last edited:

hippy

Technical Support
Staff member
Excellent stuff. One thing you could perhaps improve things with is to use SYMBOL definition to define ESC and use the actual characters within the SERTXD's. This may make them easier to use and to translate what the SERTXD is actually doing, for example ...

ESC [ <row> ; <col> H

Rather than being : SerTxd( 27, 91, row , 59, col, 72 )

Can be : SerTxd( ESC, "[", row, ";", col, "H" )
 

Goeytex

Senior Member
Excellent stuff. One thing you could perhaps improve things with is to use SYMBOL definition to define ESC and use the actual characters within the SERTXD's. This may make them easier to use and to translate what the SERTXD is actually doing, for example ...

ESC [ <row> ; <col> H

Rather than being : SerTxd( 27, 91, row , 59, col, 72 )

Can be : SerTxd( ESC, "[", row, ";", col, "H" )
Next edition will use labels and tables !

Run the attached demo program and the Pixaxe sends the data packets it receives back to the terminal in both formats (Ascii character and Ascii decimal).

Part of this programs purpose was to confirm data integrity over the connection and to determine minimum character delay timing.
(As you had advised me previously)

3 ms appears to be quite reliable, so for the budget minded, no Max232 is required if the Terminal Software
supports Ascii character delays.

Thanks for the previous advise !

Goey
 
Last edited:

Goeytex

Senior Member
Screen Shot

Attached is a screen shot of a demo Picaxe Program, using PowerTerm as the Emulator. Clicking on the Power Pad send commands to the Picaxe or to the system. Each button on the PowerPad is linked to a PSL Script.

So for example when I click on High 1. the Emulator runs a small script that sends //H0 to the serial port where "serrxd" is scanning/ waiting. The Picaxe program then tests the data and performs a High 1.

If I click on ADC0 the Picaxe receives the programed // command and then sends back the data value of ADC0. PowerTerm then pops up a message box with that value.

If I click on Telnet Data. A Telnet session is opened and the the data stored via @ptr is sent to the Telnet Host.

Isn't this fun Stuff !

Goeytex
 

Attachments

Last edited:
Top