Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 26th November 2003, 09:28 PM   (permalink)
Default pic rs485

hey guys
I really need help.
I have a project for school
I have to build 5 pic boards that controls 5 relay and have 5 switch which can be programmed to sw relay on and off. also i need to connect all 5 board and a pc using rs485. also u can control the relay from pc and programmed schedules for relay. i know it is a lot to ask but i will appriciate any input.
thanks. newboy.
newboy10 is offline  
Old 26th November 2003, 10:59 PM   (permalink)
Default

I suggest you develop a RS485 to RS232 converter... so that the PC can talk to the PIC. If the pic has a RS485 card on it then you will only need one converter other wise 2 converters will be necesary.

A Visual Basic program can be created to output a character with which you can receive witht the pic and turn on the relays. Also have the PIC check the switches and send the data to the PC

Good Luck

Ivancho
ivancho is offline  
Old 30th November 2003, 03:44 PM   (permalink)
Default

I agree with Ivancho; I would build a converter using a PIC with an onboard USART to relay the RS232 signals to RS485. If I remember correctly the MAX485 chip has an enable signal for TX & RX which you can then turn on & off with the PIC.

Use a form in Excel or Access to define the switches. Use an ActiveX I/O control on the form to access the serial port. Take the switch status from your form and concatenate them into a char or byte which will be decoded by each PIC to determine if the relay has to be activated ie bit0 could be relay 1 & bit 2 relay 2 etc.

Shout if you need help...
__________________
Stef
stef is offline  
Old 1st December 2003, 02:34 AM   (permalink)
Default

You can use an RS485 transceiver from maxim and others for all of the PIC-to-PIC connections. You only need RS232 from the PC to the bus. For that I would make (or buy) a simple RS232-RS485 converter.
crust is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:50 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker