electronics forum

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

pic18f97j60 and rs485


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> pic18f97j60 and rs485
Author Message
VitroBlue



Joined: 20 Jan 2009
Posts: 2


Post20 Jan 2009 21:03   

pic 18f97j60 price


hi, i'm new in here, i'm still an undergrad

i was asked to desing a board for this pic with a freaking lot of stuff (zigbee module, ethernet module, uasrt module, 4x4 keypad, LCD, external data and program and stuff memories, control LEDs, switches, buttons...), but i'm having troubles to make it since i wasn't given any further specifications but those in the pic datasheet.

THE ACTUAL PROBLEM is the USART module. from the block diagram i thought the best thing to do would be to multiplex both the RS232 and the RS485 modules since the pic is supposed to be able to use any of them at any given time (it MUST have both separately). I already designed the 232 schematic, but i had never used the 485 before so i ignore exactly how to connect it (teorically i understand how it works, but in practice is another tale).

I have also the components price and board size limits. its only a design task, but still it has to be as generic, small and cheap as possible. I have almost everything else figured out by now, but this 485 module. so i was wondering if someone could help me out ideally with an schematic, but at least with a useful reference, because i'm kinda lost here.

Thank you in advance
atte: me
Back to top
blueroomelectronics



Joined: 17 Sep 2006
Posts: 1681
Helped: 99
Location: Toronto, Canada


Post20 Jan 2009 23:55   

pic18f97j60 ccs


does the pic have one or two usarts?
Back to top
VitroBlue



Joined: 20 Jan 2009
Posts: 2


Post21 Jan 2009 16:18   

pic18f97j60 schematic


mmm...
it seems that i misread that part in the datasheet...
which lead to a discuss with the professor...
which lead to the discovery of a minor error in the block diagram that his assistant gave us.

the pic has 2 EUSARTS i don't care about right now, and a Master SSP.
i need a SPI in the Master SSP, to connect a 2MB SFLASH memory, a parallel port for a LCD and 2 other USARTs. One of the USARTs is the ZIGBEE module i already have, but the other is the RS485 module i have no idea how to make.

so basically, despite your observation, the problem remains the same Crying or Very sad, but THANKS a lot for asking; the result simplified my existance Very Happy
Back to top
GrandAlf



Joined: 09 Mar 2002
Posts: 409
Helped: 23


Post21 Jan 2009 17:16   

rs485 ccs compiler


Its just a RS485 chip. Apart from the balanced line RS485 I/O, you have 4 connections TX, RX, TXen, RX En. You can strap RXen and TXen together as one is active low and the other high. So you need 3 connections to your pic RX TX and direction to a further spare port. Cannot remember which way round it is, think its high for receive and low to transmit. So in software you would probably have it on receive all the time. If you wanted to transmit, change direction of port then transmit data. Easy!. If you are using CCS compiler for example, you can use software uarts if you run out of hardware ones. Other compilers also have this capability.
Back to top
Google
AdSense
Google Adsense




Post21 Jan 2009 17:16   

Ads




Back to top
blueroomelectronics



Joined: 17 Sep 2006
Posts: 1681
Helped: 99
Location: Toronto, Canada


Post21 Jan 2009 19:53   

pic18f97j60 ccs example


Well the RS485 will use a ESUART with an extra pin need for direction control (think of RTS)
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> pic18f97j60 and rs485
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
TTL to RS485 and RS485 to RS232 Converter (1)
RS485 and PC (5)
RS485 and 4-20mA (2)
DB9 and RS485 (2)
interface between rs485 and pic (2)
Difference between RS232 and RS485? (12)
Proteus 7.1 sp2 and MAX487 (RS485) (1)
PIC18F4620 and RS485 inteface(SN75176) (4)
Delphi and rs485 interface advice needed (3)
How to do reverse Engineering On RS232 and RS485 (9)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS