Eng.ME
Newbie level 4
- Joined
- Jan 5, 2010
- Messages
- 7
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- Palestine-Gaza
- Activity points
- 1,328
Can any one convert this c code to assembly code .. i'm using this code with pic16f877a ....
##################################
unsigned int Digital;
unsigned float A;
unsigned char txt[13];
void main()
{
Lcd_Config(&PORTB,0,2,1,7,6,5,4);
Lcd_Cmd(LCD_CURSOR_OFF);
//##############################
lcd_out(1,1,"Volt: ");
TRISA.f0=1; // INPUT ANALOG
ADCON1=4; // RA0 & RA1 ARE ANALOGS
do
{
Digital = Adc_Read(1); // READ FROM RA0
delay_ms(20); // sampling time = 20 ms
A=(Digital*5.0)/1023;
FloatToStr(A,txt); // convert the number to ascii code
lcd_out(1,6,txt);
}while(1);
}
Added after 20 minutes:
Help me plz
##################################
unsigned int Digital;
unsigned float A;
unsigned char txt[13];
void main()
{
Lcd_Config(&PORTB,0,2,1,7,6,5,4);
Lcd_Cmd(LCD_CURSOR_OFF);
//##############################
lcd_out(1,1,"Volt: ");
TRISA.f0=1; // INPUT ANALOG
ADCON1=4; // RA0 & RA1 ARE ANALOGS
do
{
Digital = Adc_Read(1); // READ FROM RA0
delay_ms(20); // sampling time = 20 ms
A=(Digital*5.0)/1023;
FloatToStr(A,txt); // convert the number to ascii code
lcd_out(1,6,txt);
}while(1);
}
Added after 20 minutes:
Help me plz