I've been looking at doing some analogue to digital conversions from some small voltages (0-12v DC) to a PC or Palm serial port.
Many years ago I did something similar with a MAX232 IC, but I have pretty much forgetton everything I once new.
The thing is, I want the circuit to be multiplexed so I can sample many different voltages (up to 12 at an 8 bit resolution would be ample). So I
would send a bit to enable device one, read contents, send a bit to enable device two, read contents, etc etc.
I'd write the software myself in C when I've scraped off my coding rust
So I suppose my question's two-fold:
i) Am I talking out of my hat?
ii) Does anyone where I can get a circuit design from or anyone who'd design me one?
Cheers,
Neil.
if you dont mind the using a pic then I have just the thing for you combining a 16f877 and a max 232 and you have a circuit that would be ample for
youer needs.
ther are lots of other ways of doing it ovbviosly.
Blake
Blake,
Tell me more! (In English )
Neil.
Hi,
Ok I have fired up the spellchecker.
well if you look up the microchip website (www.microchip.com) and look at the PIC range you will see that they are basically a processor memory and
bunch of peripheral devices on a chip the 16f87X range I picked because I use them reasonably regularly
they operate at 20mhz or slower have a serial port, A to D and a whole host of other peripherals.
The below assumed you are using a 16f877 on a 20mhz clock speed (you can run it slower if power consumption in an issue however in a car there will be
absolutely know problem as even at 20 mhz you will be drawing less than .5 amps)
So to knock up your application you will need the circuit to interface the analog signal on to the pins of the PIC (port A pin 2 to 8). A 20 mhz
crystal and two capacitors to complete that part of the circuit (I can not remember any more pin number of the top of my head as I have been at the
pub). Then a max232 (or equivalent) and associated charge pump capacitors. Finally a voltage regulator. So the whole lot can be put together with 2
ic’s 9 capacitors 1 crystal and 1 voltage regulator.
Finally you will need a small amount of firm where to decode the requests over the com port so that each of the 8 pins with an analog signal can be
read back and transmitted over the com port to your device.
As for cost if you build it your self you can request a free sample of the pics from the web sight up to 3 of each type and 15 in total every
month.
Blake
OK, I'm starting to understand what you say.
The jibe about English was not a criticism of the written word, just asking you to describe you to describe any ideas in layman's terms.
Apologies if I was misunderstood.
Reading the technical spec for the the 16f877 (now superceded by the 16f877A), I might as well be reading Chinese.
I circuit diagram I can build would be very useful. If you've anything like that I'd be most appreciative.
Cheers,
Neil.
p.s. Wish I'd been in the pub
Ok I will knock up a circuit diagram to night for you and post it on hear that way other people can spot the deliberate mistakes ;-).
As for the 16f877A there are not many differences if I remember correctly just the block size that is written to so you use a new version of the boot
loader (assuming you are using a boot loader and as you have a serial port you might as well). There are a couple of other differences but I can
remember what they are and I only have the A manual to hand (not that I look at them much).
Any way I will post the diagram in my photo archive by 8 to night with any luck
ok it is now in my photoarchive
Was going to suggest the 877 too but looks like I've been beaten to it
Not sure I like your reset system though!
Chris
well how about you sugest one? looking at the diagrem I did not realise that I had left the switch in as i did it in pant qicky (I had also been at the pub)
Thanks for the diagram Blake. I've been looking into these PIC things since you pointed at them and it looks like another avenue of knowledge
I'm eager to learn.
I can understand the IC connections, but why capacitors are placed where they are, or their ratings are what they are is beyond me at present.
Chris, do you regard the reset at too violent? What would you recommend instead?
Cheers,
Neil.
at a gues the problem isI am kinkinf the supply and the ground witch is not realy all that clever I will do a beter reset on / tusday some time.
the cpacitors on the circuit are quite simple realy the ones round the max 232 are just thoes on the dater sheat and are ther as a charge pump.
the two on supply are just ther to give a more stable supply.
blake
ps for a reset you could use a switch do discovet the supply for the pic and also conect the conections to ground so that ther is no direct path from
+ to ground.
blake
If you need help with PIC's, it's what I do for a living (when not posting on here ).
If you really need a reset switch, then you simply connect a suitable value resistor (10k is fine) from MCLR to Vdd (+5 volts), and connect your reset
switch from MCLR to Vss (i.e. ground). Don't be tempted to add a large value cap from MCLR to Vss as used to be common practice, this can
destroy the PIC when you remove the supply voltage.
The PIC has built in brownout detection, so complex external reset circuits are rarely needed.
Sorry, just noticed this post again.
Shorting out the supply line isn't a great idea to reset the system, even if the reg does have short circuit protection. Pulling MCLR to ground
(with a pull up to +v) is a much better idea and less prone to stressing the power supply.
Chris
quote:
Originally posted by MikeRJ
If you need help with PIC's, it's what I do for a living (when not posting on here ).