Hi Mel ,Isaac & CocaColaKid
Thank you very much for your help i have tried the following code on both the 16f877 and the 18f452 and this does confirm my fears
PBP DOES NOT SUPPORT the DATA@ command in version 2.45
the errors are still there or is there something i am missing here?
Although the link Mel gave below of which i have quoted says that in version 2.44 this was corrected , i can't figure out why this don't work in version 2.45 which is what i have here.
Could someone please prove me wrong as i don't want to be right on this .
DEFINE LOADER_USED 1 ' uses a bootloader
@ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H
Define OSC 20
clear
DEFINE LCD_DREG PORTD ' Use Portd for LCD Data
DEFINE LCD_DBIT 4 ' Use Upper(4) 4 bits of Port
' PORTD-4 thru PORTD-7 connects to
' LCD DB4 thru LCD DB-7 respectively
DEFINE LCD_RSREG PORTE ' PORTE for RegisterSelect (RS) bit
DEFINE LCD_RSBIT 0 ' PORTE-0 pin for LCD's RS line
DEFINE LCD_EREG PORTE ' PORTE for Enable (E) bit
DEFINE LCD_EBIT 1 ' PORTE-1 pin for LCD's E line
DEFINE LCD_BITS 4 ' Using 4-bit bus
DEFINE LCD_LINES 2 ' Using 2 line Display
DEFINE LCD_COMMANDUS 2000 ' Command Delay (uS)
DEFINE LCD_DATAUS 50 ' Data Delay (uS)
' ** Define LCD Control Constants **
I CON 254 ' Control Byte
Clr CON 1 ' Clear the display
Line1 CON 128 ' Point to beginning of line 1
Line2 CON 192 ' Point to beginning of line 2
data@0, 0,10,20,30,40,50,60,70,80,90,100
' Software Defines
' ----------------
' ** Declare the Variables **
Temp VAR byte ' General Purpose
Data_Out VAR byte' Data read from the Eeprom
Data_In VAR byte ' Data written to the Eeprom
address VAR byte' Address
'
' Initialise Hardware
' -------------------
ADCON1=7
TRISA=%00000000
TRISB=%00000000
TRISC=%10000000
TRISD=%00000000
Pause 1000
lcdout I,Clr:Pause 30
lcdout I,Line1," 18F452 TEST "
lcdout I,Line2+2,"..Power On.. !!"
Pause 1000 '
loop:
'READ SUB
'=======
For address = 0 TO 10 ' Loop 50 times
lcdout I,Clr:Pause 30
READ address,Data_Out
lcdout I,Line1+2," Eprom Values :"
lcdout I,Line2+2,#address,": ",#Data_Out ' Display Eprom Data
Pause 1000
Next address
GoTo loop
End
'With 16F877
'===========
' I get the correct values written to the eeprom and read back as follows
' address 0 = 0
' address 1 = 10
' address 2 = 20
' address 3 = 30
' address 4 = 40
' address 5 = 50
' address 6 = 60
' address 7 = 70
' address 8 = 80
' address 9 = 90
' address 10 = 100
'With 18F452
'===========
' I get the values written to the eeprom and read back as follows
' address 0 = 0
' address 1 = 20
' address 2 = 40
' address 3 = 60
' address 4 = 80
' address 5 = 100
' address 6 = 0
' address 7 = 0
' address 8 = 0
' address 9 = 0
' address 10 = 0
Bookmarks