Program Editor Terminal

piclt

Member
I use a picaxe to talk to a device using the serial port,
a typical command would be sertxd (27,88,64)
This sends the decimal numbers 27 then 88 then 64 out the serial port. I can read this in Hex on a datascope in hex as 1B then 58 then 40. OK all works fine.
This code is actually escape followed by two number values.
I wanted to connect the device direct to PC comm port and use the Prog editor terminal to send codes directly I could not get the same codes generated.
When I type in 27 to output buffer and click send I get 32 then 37 on the datascope connected to comms.
sililarly 88 gives 38 then 38 and 64 gives 36 then 34.

If I type in the hex values for 27 ie 1B it gives me 31 then 42

Basically I want to be able to put in manually via the editor a few test commands that would work as sertxd does.

Could anyone please explain what is happening ???? Thanks

 

hippy

Technical Support
Staff member
The PICAXE Terminal sends 27 as two characters, "2" then "7" and what you are seeing is the code values of those characters. To send Escape and binary data you'll need to use some other Terminal Emulator, such as Hyper-Terminal.
 

piclt

Member
Yes that is what is happening. The terminal sends the ascii code for the value 2 then ascii code for the value 7. Ascii code decimal 32 or 020 Hex is the space character and only characters above 32 are printable. So when I type 2 into the input buffer it sees it as value 2 (hex 32)or (dec 50). What I want to send is (dec 27) or (hex 1B) which is the ascii Escape character and not "keyin able !!!. or aleast I cant do it. I have tried HyperTerminal and other terminal emulators but all seem to behave the same way. I have also put the codes in a file and tried file transfer using various terminals but no different. The sertxd command of the picaxe must be taking the 27 as the decimal position in the ascii table and transmitting the to the serial port as binary bits which I can read as (dec 27) or (hex 1B) The terminal seem to see what I key in as the ascii value 2 and 7.
Any more ideas ! ! ! ???? Thanks
 

piclt

Member
I searched the web for various terminal emulators and I have found one that does exactly what sertxd does. You key in the numbers and it sends the proper ascii codes even for the control ones below 32. and it works with the comma separator as well same as sertxd. It is called Realterm (if you Yahoo "realterm" should find it) It sends and captures characters and files and monitors the ports and pins, There are PIC, I2C etc options as well ??. But if I transfer a text file of codes it still just sends the ascii text. So I am away to see if I can do that ! !
Hopefully maybe of use to someone else as well, cheers
 

piclt

Member
PS to previous post

you have to send what you type in as numbers option, not ascii option. You do it from the send tab, type codes separated with commas into small box,click send numbers
 
Top