Rules | Recent posts | topic RSS | Search | Register  | Log in

Pease help! PIC18F4620 and RS485 inteface(SN75176)

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Embedded Systems and Real-Time OS
Author Message
dollar



Joined: 26 Jul 2008
Posts: 4


Post26 Jul 2008 17:21   Pease help! PIC18F4620 and RS485 inteface(SN75176)

How can i connect the SN75176 interface to my PIC18F4620?

What is TTL? does it mean that the voltage is between 0V and 5V?

My peripheral device(AX-12 actuator) has the following requirements:serial communication(TTL), half duplex protocol, 1Mbips data rate, and input voltage(7V-10V).

did i choose the right devices to communicate with the AX-12?

Thanks
Back to top
kmougiakos



Joined: 10 May 2006
Posts: 7


Post31 Aug 2008 15:47   Re: Pease help! PIC18F4620 and RS485 inteface(SN75176)

Hello dolar,

you do not need to connect this kind of driver to your PIC microcontroller.
If you read carefully the attached datasheet at page 7, you will find out the right connection diagram.

The communication type is a TTL half-duplex one and not an RS485 one. This means that in the same line, which consists of two wires(gnd and data wire), you can receive and send data as well. The voltage level is 0-5V. So use the 74hc126 buffer and an inverter 74HC04 as the schematic shows. In this way when the direction pin of your microcontroller is high you can send data. If it is low, you can receive.

And also connect TXD and RXD to micorocontroller's TX and RX.

If you follow these rules and construct correct data packages according to the protocol described later you will be able to properly fuction this device...

If this hardware



Sorry, but you need login in to view this attachment

Back to top
dollar



Joined: 26 Jul 2008
Posts: 4


Post31 Aug 2008 21:39   Re: Pease help! PIC18F4620 and AX-12 servo motor.

hi kmougiakos,

thank you for your answer. for now i am using only one pin (Tx-pin of the my PIC) to transmit data to the data line of the AX-12. So it is a straight connection.But, I still cant communicate with the AX-12. Do you need a pull up resistor in the data transmission line?

I do not know where to connect the Direction_Pin in my PIC. There is no such pin. The input/output specification of each port of the PIC is done with the "TRISn" register.

I wrote a code to switch the LED of the AX-12. I tried many time to light the LED in vain.

Best regards
Dolar
Back to top
kmougiakos



Joined: 10 May 2006
Posts: 7


Post03 Sep 2008 14:34   Re: Pease help! PIC18F4620 and RS485 inteface(SN75176)

Dollar,

you must solve some "problems" by yourself. You have to think deeper.

Lets see your questions :

What is Direction_pin? It is an ouput pin (you set it as output by the appropriate TRIS register and you handle it by the LAT register) from the microcontroller to the logic IC. So it doesn't need to by a special pin, just a simple digital IO pin.

BUT, you said that you are not using the datasheet's schematic and you are using only TX pin.

Well, my advice is to construct the circuit of the datasheet in order have the device working. Otherwise you won't be able to read the data AX-12 isenting to you.

I can't help you more. If you don't help yourself by studying the datasheet and follow its instructions you have no chance in your work...
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Embedded Systems and Real-Time OS
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap