Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] adc and lcd using pic 18f4580

Status
Not open for further replies.

shalini v

Newbie level 3
Joined
Sep 14, 2015
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
36
sir i wrote a program for displaying 10bit adc values in lcd. It is working in some pic18f4580 kit but in some pic 18f4580 kit the values are varying from 0 to 588 only. pls help me to rectify the problem.
 

So, It is not the problem of your code, The Kit is having issues and ofcourse it is the input voltage which will be having issues as suggested. And also dont forget to check the voltage levels at each pin of ADC. Check for the maximum input voltage on the board.
 

If your "kit" has a potentiometer on the board, make sure it is not attached to the ADC pin you are using.
 

Put the measuring probes diretly over the MCU pin and ground....And then check..!!
that will confirm that full scale voltage appears in ur mcu pin
 

hello


i add this same probleme...when usiing ADC register instead of mikroc library
see https://www.mikroe.com/forum/viewtopic.php?f=88&t=64452
because FOSC used for ADC was too high.
after these changes , it was OK .. 5V -> 1023 pts
Code:
// 
  ADCON2.ADCS2=1;  // FOSC /64
  ADCON2.ADCS2=1;   //  .. au lieu de ADCS1
   ADCON2.ADCS2=1;  //   .. au lieu de ADCS0

check also TAD ...

wich compiler ?
if MikroC ?
check your real FOSC..
use a delay_ms(5000); to put a led on , then off ..and chronometre..if 5 secondes elapsed
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top