| Author |
Message |
VitroBlue
Joined: 20 Jan 2009 Posts: 2
|
20 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
|
20 Jan 2009 23:55 pic18f97j60 ccs |
|
|
|
|
| does the pic have one or two usarts?
|
|
| Back to top |
|
 |
VitroBlue
Joined: 20 Jan 2009 Posts: 2
|
21 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 , but THANKS a lot for asking; the result simplified my existance
|
|
| Back to top |
|
 |
GrandAlf
Joined: 09 Mar 2002 Posts: 409 Helped: 23
|
21 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

|
21 Jan 2009 17:16 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
blueroomelectronics
Joined: 17 Sep 2006 Posts: 1681 Helped: 99 Location: Toronto, Canada
|
21 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 |
|
 |