voltmeter- with a 8051 and SDCC

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View


Most importantly I am looking for HELP pages for the SDCC, I haven't
been able to find much.

I have an LCD display, a 89c4051, and a c compiler.  I would like to
try to make a voltmeter.  Does anybody have any sample c code to do
this.

Two parts, I don't know how to write to the lcd.  I don't know how to
read the analog bit.

I have SDCC but all I can do is produce simple code.


Re: voltmeter- with a 8051 and SDCC


On 8 Dec 2005 13:19:20 -0800, the renowned snipped-for-privacy@gmail.com
wrote:

Quoted text here. Click to load it


The AT89C4051 doesn't have much in the way of analog bits inside it-
just a comparator. If you really want to make a voltmeter you've got a
bunch of work to do. Have you looked at links from http://www.8052.com
?


Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: voltmeter- with a 8051 and SDCC



Quoted text here. Click to load it

You could use an external analog/digital converter. There are several
available; the MCP3001 from Microchip is inexpensive (only about $2)
pretty easy to interface to, using bit-banging if necessary:
http://ww1.microchip.com/downloads/en/DeviceDoc/21293b.pdf You'll have
to handle scaling the input, of course.

Which LCD are you using? The character-based matrix displays based on
the Hitachi HD44780 controller and its work-alikes are fairly available
on the surplus market and are reasonably inexpensive. It takes a little
work to get them up and running; follow the instructions in the data
sheets to the letter to get the display properly initialized. A good
reference for this type of display is available at
http://www.optrex.com/pdf/Dmcman_full.pdf

--
Rich Webb   Norfolk, VA

Re: voltmeter- with a 8051 and SDCC


I am using HD44780.  I figured out that all I need to add a putchar
function into my code.  So the LCD part should be working now.

My next part is the voltage measurement.
I thought the comparator would give a voltage value, but now I am
seeing that it only campares two pins.
Is there a way that I can measure a voltage value using the comparator.
 
Thanks for the quick replies.


Re: voltmeter- with a 8051 and SDCC


I was seeing that some chips can produce a voltage reference.  Can the
4051 do this as well.


Re: voltmeter- with a 8051 and SDCC



Quoted text here. Click to load it

Yes there is. Atmel has an application note describing how to implement
this at http://www.atmel.com/dyn/resources/prod_documents/DOC0524.PDF

--
Rich Webb   Norfolk, VA

Site Timeline