I can not put my images on the GLCD ,images there are on the demos are great and working fine , but the converter process from .bmp file to a table does not work , the converter tool in GCB seems working only in linux ?!!!!! every time comes an error ... table not found.... this image converter 565 must be a trial or something (a couple of buttons are missing at the top ) gcb gives an error always everything is according the instructions ... if you could make an extra video explaining this converter process it would be wonderfull. thank you Mr. Venn .
#chip18f2455,8#configMCLRE=ON#optionexplicit#include<glcd.h>;-----DefineGLCDHardwaresettings#defineGLCD_TYPEGLCD_TYPE_SSD1306#defineGLCD_I2C_Address0x78#defineGLCD_PROTECTOVERRUN#include<..\converters\image1.bmp>#defineHI2C_BAUD_RATE400#defineHI2C_DATAPORTb.0#defineHI2C_CLOCKPORTb.1'I2C pins need to be input for SSP module when used on Microchip PIC device Dir HI2C_DATA in Dir HI2C_CLOCK in GLCDCLS CCount = 0 dim longNumber as long longNumber = 123456 'maxvalue=4294967290dimwordNumberasWorddimoutstringasstringwordNumber=0byteNumber=0dimlengthofpicture,ram_indexaswordDimBYTENUMBER,WIDTHOFPICTURE,HEIGHTOFPICTURE,ORGCHARLOCX,CURRCHARVAL,FIRSTPASS,CHARLOCY,CURRCHARROW,CHARLOCX,CCOUNTasByte' Display a BMP file GLCDCLS ReadTable image1, 0, lengthofpicture ReadTable image1, 1, widthofpicture ReadTable image1, 2, heightofpicture lengthofpicture = heightofpicture / 8 lengthofpicture = [word]lengthofpicture * widthofpicture 'ForBMPthatfitthedisplaysimplewritethedatatothescreenCharLocX=0' specify X pos for BMP CharLocY = 0 'specifyYposforBMP.ForbufferanyvalidY,fornon-buffered0,8,16,24etc...OrgCharLocX=CharLocX' specify X orginisal X pos firstpass = true 'specifythisisthefirstpassforram_index=3tolengthofpicture+3;startatthirdbyteandfinishattheendReadTableimage1,(ram_index),CurrCharVal' read data'if((ram_index-3)%widthofpicture)=0andfirstpass=falsethen' change position for new line of data CharLocY = CharLocY + 8 CharLocX = OrgCharLocX end if For CurrCharRow = 0 to 7 if ( CharLocY + CurrCharRow < GLCD_HEIGHT ) and ( CharLocX < GLCD_WIDTH ) then If CurrCharVal.0 = 0 Then PSet CharLocX , CharLocY + CurrCharRow, GLCDBackground Else PSet CharLocX , CharLocY + CurrCharRow, GLCDForeground End If end if Rotate CurrCharVal Right Next firstpass = false 'nowthisisNOTthefirstpassCharLocX++'incrementtheXposnextwait2sSetContrast_SSD1306(10)wait2sstartscrollright_SSD1306(0x00,0x0F)wait3sstartscrollleft_SSD1306(0x00,0x0F)wait3sstartscrolldiagright_SSD1306(0x00,0x0F)wait3sstartscrolldiagleft_SSD1306(0x00,0x0F)wait3sstopscroll_SSD1306GLCDCLSend
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Reporting via YouTube
Mr Silva - I need the file
image1.bmp
simple image for testing