You are on page 1of 1

'****************************************************************

'* Name
: UNTITLED.BAS
*
'* Author : [select VIEW...EDITOR OPTIONS]
*
'* Notice : Copyright (c) 2015 [select VIEW...EDITOR OPTIONS] *
'*
: All Rights Reserved
*
'* Date
: 27/11/2015
*
'* Version : 1.0
*
'* Notes :
*
'*
:
*
'****************************************************************
' Set LCD Data port
DEFINE LCD_DREG PORTD
' Set starting Data bit (0 or 4) if 4-bit bus
DEFINE LCD_DBIT 4
' Set LCD Register Select port
DEFINE LCD_RSREG PORTC
' Set LCD Register Select bit
DEFINE LCD_RSBIT 0
' Set LCD Enable port
DEFINE LCD_EREG PORTC
' Set LCD Enable bit
DEFINE LCD_EBIT 1
' Set LCD bus size (4 or 8 bits)
DEFINE LCD_BITS 4
' Set number of lines on LCD
DEFINE LCD_LINES 2
' Set command delay time in us
DEFINE LCD_COMMANDUS 2000
' Set data delay time in us
DEFINE LCD_DATAUS 50
DEFINE ADC_BITS 8
' Set number of bits in result
DEFINE ADC_CLOCK 3
' Set clock source (rc = 3)
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in microseconds
ADCON0 = %
ADCON1 = %
TRISB = %00000000
A VAR BYTE
INICIO
ADCIN 0, A
A = PORTB
LCDOUT $FE,1, "EL NUMERO ES:"
LCDOUT $FE, $C0, DEC A
PAUSE 500
GOTO INICIO
END

LINKS DE AXIOLOGIA
http://www.rtvciplima.com/te-invitamos-a-la-semana-de-la-ingenieria-2015/

You might also like