problem with adc example n lcd

General discussion on mikroC PRO for AVR.
Post Reply
Author
Message
haglan
Posts: 3
Joined: 22 Dec 2009 16:39

problem with adc example n lcd

#1 Post by haglan » 22 Dec 2009 16:46

i try to make circuit adc n lcd i example
using atmega 16
8MHz internal

before i make it itry adc example with proteus circuit is same in adc example
is work . then i try in real hardware did'nt work ?? can help ... in LCD to in real harware not work ... why ... : cry:

i like mikroc because easy to use
please help ...

User avatar
tihomir.losic
mikroElektronika team
Posts: 2138
Joined: 02 Dec 2009 14:16
Location: Serbia
Contact:

#2 Post by tihomir.losic » 23 Dec 2009 14:12

Hello,

please, can you send me whole project attached with your message, in order to solve your problem?

Thanks

Best regards,

Losic Tihomir
mikroElektronika [Support team]

haglan
Posts: 3
Joined: 22 Dec 2009 16:39

^_^

#3 Post by haglan » 28 Dec 2009 23:07

my source code is same in example adc and lcd in mikroC pro for avr

User avatar
tihomir.losic
mikroElektronika team
Posts: 2138
Joined: 02 Dec 2009 14:16
Location: Serbia
Contact:

#4 Post by tihomir.losic » 29 Dec 2009 13:40

Hello,

in C:\Program Files\Mikroelektronika\mikroC PRO for AVR\Examples\Development Systems\EasyAVR6 folder you only have ADC on LEDs,
but there is no problem to send you little example for ADC_on_LCD. Here is our example:

Code: Select all

// LCD module connections
sbit LCD_RS at PORTD2_bit;
sbit LCD_EN at PORTD3_bit;
sbit LCD_D4 at PORTD4_bit;
sbit LCD_D5 at PORTD5_bit;
sbit LCD_D6 at PORTD6_bit;
sbit LCD_D7 at PORTD7_bit;

sbit LCD_RS_Direction at DDD2_bit;
sbit LCD_EN_Direction at DDD3_bit;
sbit LCD_D4_Direction at DDD4_bit;
sbit LCD_D5_Direction at DDD5_bit;
sbit LCD_D6_Direction at DDD6_bit;
sbit LCD_D7_Direction at DDD7_bit;
// End LCD module connections

char txt[] = "ADC_LCD Control";

char chVAL[16];
unsigned int VAL=0;

void main(){
  Lcd_Init();                  // Initialize LCD
  Lcd_Cmd(_LCD_CLEAR);         // Clear display
  Lcd_Cmd(_LCD_CURSOR_OFF);    // Cursor off
  Lcd_Out(1,1,txt);            // Write text in first row
  Delay_ms(1000);
  Lcd_Cmd(_LCD_CLEAR);         // Clear display

  Lcd_Out(1,1,"Value=");       // Write text in first row
  while(1){
     VAL=Adc_Read(0);
     WordToStr(VAL,chVAL);
     Lcd_Out(1,7,chVAL);
  Delay_ms(1000);
 }
}
I hope that I helped you.

Best regards,

Losic Tihomir
mikroElektronika [Support team]

ezla
Posts: 1
Joined: 04 Feb 2010 21:04

im seeking help for the source code adc on 8 bit lcd

#5 Post by ezla » 04 Feb 2010 21:10

im using PIC18f452 and mikroC
my project basically about transferring analog data into digital and display to 8 bit lcd.
can u pls help me on the source code for the programming...
currently, im still using potentiometer as my analog data...
thanks..

i hope anyone can help...thanks..

Post Reply

Return to “mikroC PRO for AVR General”