Picaxe To Computer

Hello everyone

I have been looking through the commands in the language BASIC and have seen that you can use the serial port to communicate and also use a keyboard with a picaxe.

i am using a picaxe 28X and wondered if you could type into the keyboard wired to the picaxe and make it display this on screen...??? :confused:

any help appreciated

thanks

alex
 

hippy

Technical Support
Staff member
You can read the keyboard using KEYIN then send the data out serially using SEROUT ( or SERTXD ) and that can be received by a PC. You can use a Terminal Emulator ( HyperTerm etc ) to display that data or you can write your own PC-based programs to do that.
 
hey

what is a terminal emulator and where can i get one/do u know of a good one?

i have never heard of this before

thanks
 

BeanieBots

Moderator
If you've got a standard windows installation:-
START->All programs ->Accessories->Communication->Hyperterminal.
The PICAXE installation also has a built in one. Just hit F8 with the editor loaded.
Hippy has written a nice one.
I guess it is available from his site.
 
Last edited:
ok...but from in the programming editors version how do you set it up so when a line of variables or data is sent serially to the computer it will display that data??? :)
 

BeanieBots

Moderator
Your need both to be set to the same.
For example, if you use N2400 baud in your PICAXE, then you must set the terminal to be 2400 baud as well. Then just send your data and it will be displayed.
 
Ok then maybe i havnt got it :(

there is always something that goes wrong with me.

anyway i have linked up pin1 (TX) to the serial wire as it says in the picaxe manual circuit with a 180 ohm resistor in the line yet nothing happens. i can see the picaxe is sending data baceause if you put an led across the out put it flashes every second (i am using the sample program)
this is the program:
main: serout 1,N2400,(“Hello”) ‘ Send the word ‘Hello’
serout 1,N2400,(10,13) ‘ Send the ‘new line’ instructions.
pause 1000 ‘ Wait one second
goto main ‘ Loop back to the start

I am using a picaxe 08M in this project. the baud rate is set to 2400 on the termial emulator yet....nothing
could it be the length of the cable going back to the computer or the fact i am using 4.5V to run the picaxe?
any ideas???
sorry to keep bothering you....

alex
 

hippy

Technical Support
Staff member
The first thing to check is that you also have 0V connected, and secondly that you've got the wires going to the correct pins of the 9-way D or whatever connector you are using. If you have Tx/Rx swapped over, nothing will happen. Finally, check you have selected the correct COM port to listen to in the terminal Emulator.

The 4.5V and length of cable shouldn't matter providing it's not ridiculously long ( tens of metres ).
 
Top