Go Down

Topic: AAG Weather Station - RS485 version (Read 7639 times) previous topic - next topic

Coding Badly


At least to start, I suggest using the Arduino to perform all programming (no bootloader / only ISP) and the serial / RS-485 for debugging.  You will be able to leave a terminal application running while you upload a new program (which is very nice).

EmilyJane

So, that means that whatever I program into the chip will have to support controlling the RS485 transceiver if I understand you correctly.

graynomad

I doubt you can use the RS485 as (I assume) it's half duplex and the standard bootloaders won't like that.

Hacking into the RO and DI lines should work though if you disable the 485 receiver as you said.

Quote
If I pull the transceiver enables HIGH,

A PU resistor should do the trick here.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

EmilyJane

Okay, sounds like a project! Tomorrow, I'll take a closer look at the circuit board and get started. Thanks for the advice so far!

Coding Badly

Yes.  The benefit is that you will very quickly have reliable code for communicating with your weather station.  The drawback is that you have to start with the communications code and that you have to have your Arduino handy so it can act as a programmer.

I think Serial could be fairly easily sub-classed to include the necessary support for transmitting.

graynomad

I would also go with the ISP programming, it'll give you a couple of k extra flash as well.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

EmilyJane


Yes.  The benefit is that you will very quickly have reliable code for communicating with your weather station.  The drawback is that you have to start with the communications code and that you have to have your Arduino handy so it can act as a programmer.

I think Serial could be fairly easily sub-classed to include the necessary support for transmitting.



Once I get the stock Serial interface working, with a FTDI serial to USB adapter, I can add a SoftwareSerial RS485 routine like I'm using now to communicate with it from an Arduino. Then I can ditch the USB interface and program it using ISP and no bootloader.

By sub-classing Serial do you mean modifying it to support RS485? That would be nice and I don't think would be too difficult. I would want it to support normal RS485 slave addressing. Atmel calls it MPCM. Somebody may have already done that.


I would also go with the ISP programming, it'll give you a couple of k extra flash as well.

______
Rob


This is an Atmega8 so I think it'll free up 1K. I'll probably need it.

Coding Badly

Quote
By sub-classing Serial do you mean modifying it to support RS485?


Yes.

Quote
I would want it to support normal RS485 slave addressing. Atmel calls it MPCM. Somebody may have already done that.


Definitely start with Google (forum and internet-at-large).  RS485 pops-up on the forum from time-to-time.

EmilyJane


Quote
By sub-classing Serial do you mean modifying it to support RS485?


Yes.

Quote
I would want it to support normal RS485 slave addressing. Atmel calls it MPCM. Somebody may have already done that.


Definitely start with Google (forum and internet-at-large).  RS485 pops-up on the forum from time-to-time.



Okay, I'll definitely do that. I've moved the topic over to the Device Hacking section. I hope you and Graynomad will continue to give me your good advice.

http://arduino.cc/forum/index.php/topic,71362.msg532229.html#msg532229

Go Up