I have the below code with 16f88 , and i want to know if may use the pin RA4
as analog input.
I want to read the voltage from a tuner.The range of voltage is 0.5-3.5V.
Code:CMCON = 7 ' PortA = digital I/O DEFINE LCD_DREG PORTB 'Selection of the port B DEFINE LCD_DBIT 0 'Selection one RB0 with RB3 DEFINE LCD_RSREG PORTA 'RS on port A DEFINE LCD_RSBIT 2 'RS on RA2 DEFINE LCD_EREG PORTA 'E on port A DEFINE LCD_EBIT 3 'E on RA3 DEFINE LCD_BITS 4 'Mode 4 bits DEFINE LCD_LINES 2 '2 lines DEFINE I2C_SCLOUT 1 PAUSE 500 ' ** DEFINITION OF THE ENTREES - EXITS ' Exits I2C SCL var PORTA.1 'SCL on RA1 (pine 18) SDA var PORTA.0 'SDA on RA0 (pin 17) ' Boutons UP var PORTB.6 'increase the frequency (on RB6) DOWN var PORTB.7 'decrease the frequency (on RB7) CH_PAS var PORTB.5 'Change the step of synth (on RB5) Input UP 'Up and Down are entries Input DOWN Input CH_PAS




Bookmarks