I'm trying to run this on 16F886
and getting error
ASM Symbol not previously defined FSR1L Error 113
Any ideas?
I'm trying to run this on 16F886
and getting error
ASM Symbol not previously defined FSR1L Error 113
Any ideas?
my expectation is that old clunker chips with only one FSR register will likely not have enough Flash and/or SramI'm trying to run this on 16F886
and getting error
ASM Symbol not previously defined FSR1L Error 113
to be useful with this sort of display, the code makes no allowance for them
Warning I'm not a teacher
Well, as author stated, this code is suited for 16F series and fits under 4K. 886 has 8K.
I have not found FSR1L register on 886 chip...
Ioannis
OK, will try with 18F2550 later and write back.
Had no chance to test it yet on PBP, connected to Arduino uno for testing and launched adafruit library demos. Adjusted some speeds and quite impressed. Should I expect same speed on PIC18F2550 or it will be significantly slower?
Thanks for information
Richard, I am hoping you can help me with an issue I am having making your SSD1306 driver work. Everything is working well except when I display a bitmap with the y axis not set at 0 it cuts the image in half. I have tried with every version of the ssd1306_I2C.INC found in this thread with the same result. Posted here is the code with a simple 16x16 bitmap icon and an image of it displayed at both y=0 and y=4. Any chance you can help sort what is going on here?
Code:'**************************************************************** '* Name : ssd1306_DEMO.PBP * '* Author : richard * '* Notice : * '* : * '* Date : 19/11/2017 * '* Version : * '* Notes : * '* :FOR pic 18F26K22 SSD1306 * '**************************************************************** #CONFIG CONFIG FOSC = INTIO67 CONFIG PLLCFG = ON CONFIG PRICLKEN = OFF CONFIG FCMEN = OFF CONFIG IESO = OFF CONFIG PWRTEN = OFF CONFIG BOREN = SBORDIS CONFIG BORV = 190 CONFIG WDTEN = ON CONFIG WDTPS = 32768 CONFIG CCP2MX = PORTC1 CONFIG PBADEN = OFF CONFIG CCP3MX = PORTB5 CONFIG HFOFST = ON CONFIG T3CMX = PORTC0 CONFIG P2BMX = PORTB5 CONFIG MCLRE = EXTMCLR CONFIG STVREN = ON CONFIG LVP = OFF CONFIG XINST = OFF CONFIG DEBUG = OFF CONFIG CP0 = OFF CONFIG CP1 = OFF CONFIG CP2 = OFF CONFIG CP3 = OFF CONFIG CPB = OFF CONFIG CPD = OFF CONFIG WRT0 = OFF CONFIG WRT1 = OFF CONFIG WRT2 = OFF CONFIG WRT3 = OFF CONFIG WRTC = OFF CONFIG WRTB = OFF CONFIG WRTD = OFF CONFIG EBTR0 = OFF CONFIG EBTR1 = OFF CONFIG EBTR2 = OFF CONFIG EBTR3 = OFF CONFIG EBTRB = OFF #ENDCONFIG DEFINE OSC 64 OSCCON = %11110000 char var byte x var byte y var byte BUFF VAR BYTE[16] ANSELb = 0 ANSELA = 0 ANSELC = 0 ;use this define for hw i2c #define hwi2c 1 'SCL=C.3 & SDA=C.4 ;set and uncomment these to use softi2c 'SCL var PortC.3 ' I2C Clock 'SDA var PortC.4 ' I2C Data ;set these to match display ssdheight con 7 ; 7 = 8 PAGES 64*128 , 3 = 4 pages 32*128 ssdwidth con 127 ; 128 PIXELS WIDE sdd1306_addr con $78 Include "ssd1306_I2C.INC" ' bring it in include "font7x5_18.bas" '========================== MAIN Routine ============================== pause 100 gosub glcd_init GLCD_CLR BIG_TEXT = 0 main: SSDBM 112,0,16,16 ,StallIcon ;x,y,w,h,label Y=0 (DISPLAYS OK) ' pause 100 ' SSDBM 112,0,16,16 ,BlankIcon ;x,y,w,h,label ' SSDBM 112,2,16,16 ,StallIcon ;x,y,w,h,label Y>0 (DISPLAYS HALF OF IMAGE) ' pause 100 ' SSDBM 112,2,16,16 ,BlankIcon ;x,y,w,h,label SSDBM 112,4,16,16 ,StallIcon ;x,y,w,h,label Y>0 (DISPLAYS HALF OF IMAGE) pause 1000 ' SSDBM 112,4,16,16 ,BlankIcon ;x,y,w,h,label ' SSDBM 112,6,16,16 ,StallIcon ;x,y,w,h,label Y>0 (DISPLAYS HALF OF IMAGE) ' pause 100 ' SSDBM 112,6,16,16 ,BlankIcon ;x,y,w,h,label goto main end StallIcon: '16x16 BMP image @ db 248, 4, 226, 241, 57, 25, 25, 193, 241, 121, 25, 25, 241, 226, 4, 248 @ db 15, 16, 35, 71, 78, 76, 78, 71, 67, 64, 76, 78, 71, 35, 16, 15 BlankIcon: '16x16 BMP image @ db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @ db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0![]()
Shawn
yep, i never did test with other than 64x64 bmps, that masked the faultAny chance you can help sort what is going on here?
now we know it works with 64x64 and 16x16 bmps at least
there is a defect in the include file, the bmp usercommand macro is not quite right
in the include file the bit in red needs to be added in
Code:SSDBM?CCCCL macro Xin ,Yin ,Win,Hin,BMin IFNDEF TBLPTRL ERROR BITMAPS ONLY SUPPORTED ON PIC18 ENDIF MOVE?CB Xin , _gx MOVE?CB Yin , _gy MOVE?CB Hin/8+Yin-1 , _gy_ MOVE?CB Win+Xin-1 , _gx_ MOVE?CW Win*Hin/8 , _glcd_rad banksel _glcdbm movlw low BMin movwf _glcdbm movlw high BMin movwf _glcdbm +1 BANKSEL 0 L?CALL _ssd_bitmap endm
Last edited by richard; - 21st February 2024 at 01:43.
Warning I'm not a teacher
latest version
Warning I'm not a teacher
Thank you, Richard! That works perfectly! You have no idea how much time I spent attempting to fix that.
One other request. I am struggling to understand the macros but would like one that can do a point to point line. Something that would do x1,y1 to x2,y2. Can you assist with adding a macro to accomplish this?
Shawn
not possible with this small footprint method , horizontal and vertical lines is the best it can doOne other request. I am struggling to understand the macros but would like one that can do a point to point line.
if you want full graphics use this
https://www.picbasic.co.uk/forum/sho...741#post146741
Warning I'm not a teacher
Bookmarks