Integers can't be printed when Long are printed too ???
'----------------------#chip16F628A,4#configMCLR_OFF'----------------------'--PIC_to_LCDlines--'----------------------#DefineLCD_IO4#DefineLCD_DB4PortB.4#DefineLCD_DB5PortB.5#DefineLCD_DB6PortB.6#DefineLCD_DB7PortB.7'#DefineLCD_RSPortB.3#DefineLCD_RWPortB.2#DefineLCD_EnablePortB.1'----------------------''----------------------'--Mainroutine------'----------------------Main:'---Byte-------------ClsLocate0,0Print"8 bit count"DimbCountxAsByteForbCountx=0To255locate1,4PrintbCountxNextbCountx''---Integer----------Wait3sClsLocate0,0Print"16 bit count"DimintCountxAsIntegerForintCountx=1000To2000locate1,4PrintintCountxNextintCountx''---Long-------------Wait3sClsLocate0,0Print"32 bit count"DimlongCountxAsLongForlongCountx=3900000000To3900000200locate1,4PrintlongCountxNextintCountx''----------------------Wait3sGotoMain'----------------------End'CompilerVersion(DD/MM/YYYY):0.921/4/2013'Programanddatasizes'----------------------'Longprintingimplemeted(LCDPrintIntegerBugs)'ProgramMemory:1107/2048words(54,05%)'RAM:76/224bytes(33,93%)'LongPrintingCommented(LCDPrintIntegerWorks)'ProgramMemory:779/2048words(38,04%)'RAM:44/224bytes(19,64%)'BytePrintingCommented(LCDPrintIntegerBugs)'ProgramMemory:982/2048words(47,95%)'RAM:74/224bytes(33,04%)
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
' --- Integer ----------Wait 3 sClsLocate 0, 0Print "16 bit count"Dim intCountx As IntegerFor intCountx = 1000 To 2000 locate 1,4 Wait 100 us Print intCountx Wait 100 usNext intCountx
It still prints ///0
It must be a shared variable between Print_Long and Print_Integer … ???? I suspect SysCalcTempX in LCD.h Print, it must be the remainder for long as for integer … but still searching :-).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I can't LCD16x2 print variable type Word or Integer correctly ! I can print Strings, Longs and Bytes, so LCD works.
Displays ////0
Program compiled by Great Cow BASIC (0.9 21/4/2013)
Pic16F628A
LCD 2x16, 8 data lines
Thanks
Forget this for now !
There is a problem but it's linked with previous code ??
Sorry
Here is the minimum code that bugs :
Integers can't be printed when Long are printed too ???
Thanks
Try adding a wait in the print loop.
I've found LCDs can be sensitive to too many bytes too quickly.
I tried what you suggested !
It still prints ///0
It must be a shared variable between Print_Long and Print_Integer … ???? I suspect SysCalcTempX in LCD.h Print, it must be the remainder for long as for integer … but still searching :-).