hserin with USB download cable?

lampmaker

New Member
Hi,

for my application, I need to communicate with the PC. I intend to do so with HSERIN, as the PC may or may not send data.

Is it possible to connect the HSERIN port to the serial in port on the picaxe, so I can use the same connection to download the program and communicate?

I would have used Serrxd, were it not for the fact that it stops if the PC does not send anything (which is most of the time).

On a sidenote: are there any plans to allow HSERIN simulation with Pixace VSM?
 
Last edited:

manie

Senior Member
Which Picaxe are you using ? If x1's then look at "timeout" function in serin command, works well for me.
 

womai

Senior Member
hserin needs inverted data. So you'll need to add either a MAX232 (or MAX202) or a 74HCxx inverter between the USB converter and the Picaxe.
 

hippy

Ex-Staff (retired)
Is it possible to connect the HSERIN port to the serial in port on the picaxe, so I can use the same connection to download the program and communicate?
Yes. You will need to execute DISCONNECT to avoid data sent to HSERIN causing a download activation and you need to ensure the polarity of signals to/from each is correct.
 

lampmaker

New Member
Thanks.

About the polarity: I know the X2 parts allow for switching that. But I'm not sure exactly what it does. Suppose I use X1 parts, and take no measures to reverse the polarity, does that mean that I'll still be able to receive data, just reversed? E.g. I receive byte value of (256-x) for every value of x sent, or is there more to it and I won't be able to receive any data?
 

MartinM57

Moderator
It's electrical polarity inversion of the RS232 signal lines (whether a +ve voltage represents a logical 1 or 0 on each bit of the RS232 protocol) not just that the numerical value of the data is inverted.

If you're electrically the wrong way round on the RS232 signal lines, it just won't work at all...
 

hippy

Ex-Staff (retired)
For the X1's, with no inversion, you'll either receive nothing or corrupted data. You won't get data which you can untangle later.
 

lampmaker

New Member
Thanks for the info, I just ordered X2 parts. I should have known better; for some reason I always end up with the components with the most features :)
 
Top