Estoy desarrollando un proyecto y estoy utilizando el Pic 16F877A a 20 MHz. Ya no tengo memoria para continuar...buscando un Pic con mas memoria y con los mismos pines, el Pic 18F4550 en el mas compatible (por los pines).
Programe el pic 18F4550 y no funciona.
Busque un programa mas sencillo para comprobar diferencias. El programa es el siguiente:
['****************************************************************
'* Name : UNTITLED.BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2015 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 29/03/2015 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
' Read text from a Toshiba graphic LCD
'Device 16F877A
Device 18F4550
LCD_TYPE = TOSHIBA ' Use a Toshiba T6963 graphic LCD
XTAL = 20
'
' LCD interface pin assignments
'
LCD_DTPORT = PORTD ' LCD’s Data port
LCD_WRPIN = PORTC.0
LCD_RDPIN = PORTC.1
LCD_CEPIN = PORTC.2 ' LCD’s CE line
LCD_CDPIN = PORTC.3 ' LCD’s CD line
LCD_RSTPIN = PORTC.4 ' LCD’s RESET line (Optional)
'
'
' LCD characteristics
'
' LCD_X_RES = 128 ' LCD's X Resolution
' LCD_Y_RES = 64 ' LCD's Y Resolution
' LCD_FONT_WIDTH = 8 ' The width of the LCD’s font
LCD_TEXT_PAGES = 2 ' Choose two text pages
LCD_RAM_SIZE = 20480'8192 ' Amount of RAM the LCD contains
LCD_X_RES = 160 ' LCD’s X Resolution
LCD_Y_RES = 128 ' LCD’s Y Resolution
LCD_FONT_WIDTH = 8 ' The width of the LCD’s font
LCD_TEXT_HOME_ADDRESS = 0 ' Ensure that text RAM starts at address 0
Dim CHARPOS As Byte ' The X position of the read
Dim CHAR As Byte ' The byte read from the LCD
DelayMS 200 ' Wait for things to stabilise
ALL_DIGITAL = True ' PORTA and PORTE to digital mode
Cls
Low PORTE.2
Cls
Print At 0,0," THIS IS FOR COPYING" ' Display some text on the top line of the LCD
For CHARPOS = 0 To 20 ' Create a loop of 21 cycles
CHAR = LCDRead TEXT 0,CHARPOS ' Read the top line of the LCD
Print At 6,CHARPOS,CHAR ' Print the byte read on the second line
DelayMS 100 ' A small delay so we can see things happen
Next
High PORTE.2
'Cls ' Close the loop
Stop
/code]'
Cuando lo programo con el 16F877A ('Device 16F877A ) funciona bien. pero cuando lo programo con el 18F4550 (Device 18F4550) no sale nada en pantalla.
No se si antes se tiene que configurar algo... No se!!