8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes :: Forums :: Project Development :: Project Help
 
<< Previous thread | Next thread >>
c51 + adc0804 + lcd urgent help required
Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
bilalshah
Thu Jul 03 2008, 07:06AM
 User Offline
Registered Member #8783
Joined: Thu Jul 03 2008, 06:47AM

Posts: 2
Thanked 0 times in 0 posts
Hi
I am working on my final year project. I am using signal generator to generate a sine wave of frequency 50 hz. After this comes the ADC0804 by national semiconductors. ADC is connected to microcontroller c51 (atmel) which is connected to LCD.
Objective is to collect 100 samples from the ADC and display the peak value on LCD. Means adc samples the 0 to 5v sine wave (50hz) and displays the peak value on LCD.
I have written the code in C and tried proteus for simulation but its not working i m posting my code and cct diagram plz help me to find the bug
backup_of_nicro.zip
micro_code_adc_lcd.zip

Back to top


sashijoseph
Thu Jul 03 2008, 09:07AM

 User Offline
Registered Member #5870
Joined: Mon Feb 04 2008, 06:26PM

Posts: 471
Thanked 106 times in 101 posts
Don't have proteus installed,so can't comment on your ckt.
My advice would be to try and implement in hardware rather than use proteus.And when you do,remember to use pullups on port0.
The code seems correct except for one small error in the convertanddisplay() routine.
Here the 3rd line should be : x = binbyte/10;
Of course this wouldn't stop from atleast junk values showing up.

What error are you getting? No display?

[ Edited Thu Jul 03 2008, 09:13AM ]

Let there be music........
Back to top



This post has been thanked 1 time
 bilalshah 
Arun Kumar V
Thu Jul 03 2008, 06:24PM

 User Offline
Registered Member #426
Joined: Sun Jan 28 2007, 11:50PM

Posts: 291
Thanked 108 times in 91 posts
hello shah,

you haven't provided Vcc supply to the micro, you have used battery supply, the micro's power supply pins i,e Vcc and GND will be hidden and simulator connects them to supply while it is running.

in the lcd you should use a 10k pot between VCC, VSS and VEE for contrast control

i doubt VSM simulator model for ADC0804( i,e DLL file ) is not available in proteus there's only schematic model, so i guess you cannot simulate this ADC


Arun
Back to top



This post has been thanked 1 time
 bilalshah 
Ajay
Thu Jul 03 2008, 11:09PM
Rickey's World Admin

 User Online

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3370
Thanked 615 times in 582 posts
use ADC0808 instead in proteus, just small changes to select channel etc. you can test your code to be working or not.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


bilalshah
Thu Jul 03 2008, 11:57PM
 User Offline
Registered Member #8783
Joined: Thu Jul 03 2008, 06:47AM

Posts: 2
Thanked 0 times in 0 posts
Thanks Sashji joseph and Arun!!!!!
well i havnt implemented it on hardware yet and was trying to simulate on proteus.
I wasnt getting anything on LCD
//you haven't provided Vcc supply to the micro, you have used battery supply, the micro's power supply pins i,e Vcc and GND will be hidden and simulator connects them to supply while it is running.
//


what should i do with pin no 31 then?


//in the lcd you should use a 10k pot between VCC, VSS and VEE for contrast control
//

Can you provide me any example of the above statement......i m confused

thnx

bilal
Back to top


Arun Kumar V
Thu Jul 10 2008, 01:58AM

 User Offline
Registered Member #426
Joined: Sun Jan 28 2007, 11:50PM

Posts: 291
Thanked 108 times in 91 posts
Hello shah,

you haven't provided Vcc supply to the micro, you have used battery supply, the micro's power supply pins i,e Vcc and GND will be hidden and simulator connects them to supply while it is running.



what should i do with pin no 31 then?



in the lcd you should use a 10k pot between VCC, VSS and VEE for contrast control



here's how i connect a serial ADC0831, 8051,16X2 LCD in proteus :








Arun
Back to top



This post has been thanked 1 time
 bilalshah 
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems