sertxd speeds

G

Guest

Guest
#1
Hi there all, i've been asked if i can build an interface to a Viewsonic projector, the projector has a RS232 control port on it and i have the function control codes. I'm wanting to use a PICAXE-08M to start/stop the projector with a switch input when the switch is on start the projector and wen the switch is off stop the projector. sounds simple enough right? well no, the projector is set to 19200bps (and can't be changed) and as i'm aware the 08M can only go up to 9600bps when the internal resonator is set to 8MHz. It's looking like my only joice is the 28X chip as i can put a 16MHz external resonator on it giving me 19200bps but i see it as a waste due to only wanting 1 input for the switch and one output for the serout command. So can a 8M chip be set higher then 8MHz or is there another way i can use it at 19200bps? Any help would be great, thanks.

here's my code i've writen to do the job on a 8M chip.

setfreq m8



main: if pin3=1 and b1=0 then start
if pin3=0 and b1=1 then stp
goto main

start: sertxd($BE,$EF,$10,$05,$00,$C6,$FF,$11,$11,$01,$00,$01,$00)
pause 1000
let b1=1
goto main

stp: sertxd($BE,$EF,$03,$06,$00,$DC,$DB,$69,$00,$00,$00,$00,$00)
pause 1000
let b1=0
goto main

Another thing is the projector requires a HEX code, so is the $ defining the code as HEX?

Robert
 

Technical

Technical Support
Staff member
#2
Your only choice is a 28X/28X1. Consider the 28X1 as it also has the hserout feature which may be useful.

$ prefix is correct for outputing hex.
 

hippy

Technical Support
Staff member
#4
Unbuggered - It is possible to use the on-chip AUSART of the 18X to do 19200 baud, and according to my current notes I got the 18 working as well. It's not quite as straight forward as using SEROUT/SERTXD but not too hard either.

<A href='http://www.rev-ed.co.uk/picaxe/forum/Topic.asp?topic_id=5210&amp;forum_id=27&amp;Topic_Title=High%252DSpeed%2BSerial%2BOutput&amp;forum_title=No+new+posts+please%21+19' Target=_Blank>External Web Link</a>


 

hippy

Technical Support
Staff member
#6
Start with the given link, then Forum search for High-Speed Serial, Midi and DMX. For the full gory details you'll need to read the PICmicro manual ( 16F88 for the PICAXE-18X ), but you can by without having to really understand too much.
 
Top