I would like to build a voting system
with approx. 100 clients.
I decided to use small PICs in the clients
communicating one server. The server
will poll them periodically. I tought I can
use RS232 network, but RS232 is not
multiclient. What kind of protocol should
I use to minimize required cables?
Should I use star point network?
I have to deal with 20-50 meters of distance.
- As i got it a PIC's USART need a 75176 to connect it to a RS485 network,
also I need an external power supply, and terminator resistors.
- I read that 32 clients can connect to a line. And 128 is possible, how?
What repeater(IC) should I use?
I think a PIC16F628 + 75176 is cheaper than a 18Fxxx but if
CAN bus is easier to implement than i'll obey :roll:
Regarding RS485 if you use Max 487 or Max 1487 as driver you can have up to 128 transmiters on a single RS485 bus, if you use LTC 1487 as driver you can have up to 256 transmiters on a single RS485 bus.
PIC 16F628 should work if your application software requirements are small enough.
I can not help you with CAN as I have never used it ...
Tell me if Iam wrong:
if I say i need 100 clients i mean if I poll them with
the PC than I have 1 driver and 100 receiver, and
if a client talks to the PC than the PC turns to a receiver and that client will be the driver. Is it right?
So I should use 100 + 1 = 101 MAX487 as driver/receiver for every client incl. the PC?
Is there any replacement for max487/max 1487?
(Maxim ICs are hard to get here)
Got ST485 here in the local store, they said they'll
check the quantity for me (I think they don't have 100 pieces ),
it can handle 64 nodes.
I asked the local MAXIM sales to give me a price
for 100 pieces of MAX487, but they can ship only in 3-5 weeks.
And 75176 is limited to 32 nodes...
Hello,
If you use CAN instead of RS485 the software for the pics will be easier becouse the CAN controller automatically will detect errors on the bus( the CRC generator is built in) CAN is also faster ) search microchip's website they have very nice articles about using CAN
If you want to use the CAN bus then search the new stand-alone CAN controller MCP2515 from Microchip, that is a replacement of the old MCP2510 whit new features and all old errata fixed.
Finally I ordered 100 pieces of MAX487, they said
it'll be here in 2 weeks.
I'll check out CAN too, but it think i'll use RS485 for now, thanks everyone.
Did anyone tried to transmit voice over RS485?
Is it possible to digitize the voice with PIC's A/D
and send it over a 250kbps RS485 net? I need
only speech freq.
I have an application where I use one A/D channel of a pic 16F877 (running at 16MHz) to digitize voice with 8KHz resolution. The digitized values (10 Bit) are ADPCM coded (2 A/D values go into one byte) and the result is stored in an Atmel Dataflash.
Works nice if you can make your input signal cover almost the complete A/D range.
Playback is done with one 16F877 PWM channel using a two stage R/C filter and an LM4819 to drive the speaker.