Picaxe 232 communication HELP!

tesladude

New Member
I am using the serial output command which is specified to work with 232 interfacing. I am attempting to use an sv652 transmitter module in order to send the signal

Transmitter: http://nicerf.com/product_148_58.html

For some reason when I send serial data into the rx pin of the module it does nothing. I am assuming I am mistaken somewhere. I have the same baud rate set in my program as well as on the module. I have attached the screenshot of all settings the module can be set to, I was hoping these modules would be like the plug and play ASK transmitters but I could use some guidance after all!

Thank you!
 

Attachments

hippy

Technical Support
Staff member
Perhaps this post would get more traction in the main forum instead of the finished project forum?
At least it gives us a chance to test the Move the Thread functions!

For some reason when I send serial data into the rx pin of the module it does nothing
It could be a polarity or wiring issue. Could you post your code PICAXE which you are using.
 

tesladude

New Member
At least it gives us a chance to test the Move the Thread functions!


It could be a polarity or wiring issue. Could you post your code PICAXE which you are using.
I will go ahead and make a new post in the main forum but here is my code as well as the settings I have on my transmitter. Just to be clear when I say it is not working the module is not showing a ( signal sent) LED nor is it drawing the correct amount of current in order to be transmitting.
The program above was meant to be a basic test, click a button tx and turn on led rx
 

Attachments

tesladude

New Member
I figured it out. It turns out that I purchased the SV652-RS485. The description what somewhat misleading.

So now would any of you suggest that I try returning the modules and get ones meant for 232? Or would it be easier to try using a 232 to 485 converter? Any luck with those?
 

tesladude

New Member

hippy

Technical Support
Staff member
As they do TTL, 232 and 485 versions it might be worth considering the TTL version to avoid any issues relating to 232 voltages.

Unfortunately the datasheet is quite light on actual interfacing details so it is rather hard to say which would be best, or if it would be possible to use the 485 version with a PICAXE.
 

tesladude

New Member
As they do TTL, 232 and 485 versions it might be worth considering the TTL version to avoid any issues relating to 232 voltages.

Unfortunately the datasheet is quite light on actual interfacing details so it is rather hard to say which would be best, or if it would be possible to use the 485 version with a PICAXE.

So I understand they are just different languages for comunication and I assume that ttl is the most basic, (basic being what I want out of this project) but how do I send data from a picaxe in TTL? Since there is no legit TTL command I am assuming it is just rfout/rfin which I have used on ASK transmitters in the past?
 

darb1972

Senior Member
TTL only refers to the logic levels (Transistor To Transistor logic). It is not a command nor a communications protocol.

RS232 (true/not modified RS232) uses voltages that are out of the specified range for PICaxe and most other logic level chips (whether they are TTL or CMOS (Complimentary Metal Oxide Semiconductor)). RS232 over short lengths and/or on local PCBs is probably fine with a modified version of the protocol using logic levels like TTL. RS232 over much longer runs would need to use the more robust voltage levels (+15V/-15V from memory) to avoid noise, cable losses, maybe propagation issues etc. If this was needed, then using dedicated RS232 transceivers (like a MAX232) is a must.

Regards
Brad
 

johnlong

Senior Member
Hi
are you using 2 units connected to picaxes at both ends ?
remember RXD on the picaxe goes to TXD on the Hope and TXD of the picaxe to RXD of the hope
Insure all baud rates are set to 9600 (T9600 on picaxe) for your data rate try 1024 or around that figure
drop your power level down a bit 5/6 make sure both units are the same for all parameters have a couple of metres between them
then try sending a preamble (serout b.1,T9600,(85,85,85,85,254,"awake") from unit1 to unit2 (serin c.2,T9600,(254,"awake") get unit2 to send
back (serout c.1,t9600,(254,"ready")
to unit1 (serin b.0,t9600,(254,"ready)
this will let you know if the units are connecting from there spec sheet CS needs to be high make sure it is
them try a loop to send out some data
regards john
 

tesladude

New Member
ok If I understand correctly then I can not use a picaxe pin to send rs232 signals DIRECTLY to one of these rs232 modules because picaxe obviously runs >5v.
The modules I am trying to use also come in a TTl compatible version so is this the one I need? what kind of picaxe output signal will be able to directly work with one of these modules so I can achieve long range communication?

Hi
are you using 2 units connected to picaxes at both ends ?
remember RXD on the picaxe goes to TXD on the Hope and TXD of the picaxe to RXD of the hope
Insure all baud rates are set to 9600 (T9600 on picaxe) for your data rate try 1024 or around that figure
drop your power level down a bit 5/6 make sure both units are the same for all parameters have a couple of metres between them
then try sending a preamble (serout b.1,T9600,(85,85,85,85,254,"awake") from unit1 to unit2 (serin c.2,T9600,(254,"awake") get unit2 to send
back (serout c.1,t9600,(254,"ready")
to unit1 (serin b.0,t9600,(254,"ready)
this will let you know if the units are connecting from there spec sheet CS needs to be high make sure it is
them try a loop to send out some data
regards john
Johnlong- thanks for you reply but apparently I purchased only 485 comparable modules thus I am in the returning process. :)
 

hippy

Technical Support
Staff member
The modules I am trying to use also come in a TTl compatible version so is this the one I need?
It depends on what you want to do, how the modules are being connected.

The TTL versions should be suitable for direct connection to a PICAXE. You should then be able to communicate using SEROUT and SERIN or HSEROUT and HSERIN. You may need to use HSERIN and a PICAXE X2 variant to be able to receive data from the module reliably.

To connect the TTL modules directly to a PC to run configuration or monitoring software you will need a USB-to-UART interface module or would need to invert the AXE027 polarity. If using RS232 modules you should be able connect them directly to a 9-way USB-to-RS232 adapter.

The PICAXE should be able to also connect to RS232 modules but you would need to check the dastasheet or test that. You will need to use an in-series current limiting resistor on the PICAXE inputs, will need to use active low (Nxxxx) baud rates and will need to use a PICAXE which supports that for HSERIN if that turns out to be required. Or you could just use MAX232 type interface chips between the PICAXE and the modules.

If I were purchasing modules having never used them I would probably buy RS232 versions so they could be used directly with my PC with 9-way serial ports and then configure my PICAXE circuits to use them as well.
 
Top