Analog to dugital 8 bits For Basic PRO Compiler




@ device pic16f877
define  osc 4
define  adc_bits 8
Define  LCD_DREG   PORTD   ' Define LCD connections
Define  LCD_DBIT   4
Define  LCD_RSREG  PORTD
Define  LCD_RSBIT  1
Define  LCD_EREG   PORTD
Define  LCD_EBIT   0 
RW      var        portd.2
low     RW         'LCD R/W low = write
trisa = $ff 
trisd = $00  
adcon1 = 0 
num var byte      
LCDOUT $FE,1,"lcd_read" 
pause 3000
main:
gosub read_value 
gosub display
pause 200
GoTo main	
End
display:   
LCDOUT $FE,$80," setting value  "
Pause 20
LCDOut $FE,$C0,"temp_set1=",dec3 num ," 'C" 
Pause 20
return	
read_value:
adcin 0,num
pause 10    
return




READ  Lcd Module Display 2 line For Basic PRO Compiler

Leave a Comment

*
= 3 + 1

Read previous post:
48-layer V-NAND from Toshiba

Toshiba is sampling 3D NAND or V-NAND with 48 layers and a 2bit-per-cell architecture delivering a 128Gbit chip. Toshiba will...

Close
Scroll to top