Bobbla
Newbie
Offline
Posts: 22
Thank You
-Given: 2
-Receive: 16
|
 |
« on: April 19, 2013, 12:29:25 12:29 » |
|
Hallo
I've written a small library, or at least that is what it is suppose to be. Its for the I2C temperature sensor TC74, its written in mikroC PRO for dsPic 6.0.0. I'm wondering because I want to make myself a "standard" of sorts for writing libraries.. and I was wondering if there was anything that should be changed.
Also, if you have any "standard" of your own please share the information.
Thank you.
EDIT: Really?? nothing wrong?? nothing to add?? I find that hard to believe.
|
|
« Last Edit: April 28, 2013, 08:43:02 20:43 by Bobbla »
|
Logged
|
|
|
|
|
metal
Global Moderator
Hero Member
   
Offline
Posts: 2420
Thank You
-Given: 862
-Receive: 678
Top Topic Starter
|
 |
« Reply #2 on: May 17, 2013, 08:18:10 08:18 » |
|
what connector did you use?
|
|
|
Logged
|
|
|
|
Catcatcat
Senior Member
  
Offline
Posts: 444
Thank You
-Given: 289
-Receive: 1747
|
 |
« Reply #3 on: May 17, 2013, 08:28:58 08:28 » |
|
what connector did you use?
in these indicators is designed connector soldered directly to the PCB, but you can unsolder and wires
|
|
|
Logged
|
|
|
|
|
Catcatcat
Senior Member
  
Offline
Posts: 444
Thank You
-Given: 289
-Receive: 1747
|
 |
« Reply #5 on: May 20, 2013, 11:14:41 11:14 » |
|
immediately and update. still no signal cs sometimes incorrectly being read. so I had to use it.

see update
|
|
|
Logged
|
|
|
|
|
LithiumOverdosE
Senior Member
  
Offline
Posts: 367
Thank You
-Given: 390
-Receive: 610
|
 |
« Reply #7 on: May 29, 2013, 01:11:42 01:11 » |
|
@Catcatcat Your website is quite good. 
|
|
|
Logged
|
|
|
|
Catcatcat
Senior Member
  
Offline
Posts: 444
Thank You
-Given: 289
-Receive: 1747
|
 |
« Reply #8 on: June 10, 2013, 09:36:59 09:36 » |
|
 Graphics library for the driver SEPS114A SPI interface for PI24, the compiler MPLAB XC16 v1.11
|
|
|
Logged
|
|
|
|
Catcatcat
Senior Member
  
Offline
Posts: 444
Thank You
-Given: 289
-Receive: 1747
|
 |
« Reply #9 on: August 29, 2013, 06:09:46 18:09 » |
|
|
|
|
Logged
|
|
|
|
lcn
Junior Member

Offline
Posts: 42
Thank You
-Given: 15
-Receive: 1
|
 |
« Reply #10 on: October 07, 2014, 05:37:48 17:37 » |
|
Hello Catcatcat Thanks for sharing your codes for SSD1306 OLED displays. May i ask you some questions : - Did you also get SPI mode working with PIC18 ? - Does your code could work with ADAFRUIT SSD1306 OLED displays : http://www.adafruit.com/product/326- Where could we buy from Europe OLED displays (CNK109632 ) working with your libraries ? http://voron.ua website has no English language ( or, i did not find it yet  ) I tried to compile your project code : oled_8080_Grafica_web with MPLAB X and XC8 v1.12 but i get outstanding warning that i can't fix : Can you help me please ? make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf make[1]: Entering directory 'Z:/Electronique/SSD1306/oled_SSD1306_8080G.X_web/oled_SSD1306_8080G.X_web' make -f nbproject/Makefile-default.mk dist/default/production/oled_SSD1306_8080G.X_web.production.hex make[2]: Entering directory 'Z:/Electronique/SSD1306/oled_SSD1306_8080G.X_web/oled_SSD1306_8080G.X_web' "C:\Program Files (x86)\Microchip\xc8\v1.12\bin\xc8.exe" --pass1 --chip=18F25K20 -Q -G --double=24 --float=24 --emi=wordwrite --rom=default,-7CF0-7FFF --opt=default,+asm,-asmfile,+speed,-space,+debug --addrqual=ignore --mode=pro -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,+plib "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/mail.p1 mail.c "C:\Program Files (x86)\Microchip\xc8\v1.12\bin\xc8.exe" --pass1 --chip=18F25K20 -Q -G --double=24 --float=24 --emi=wordwrite --rom=default,-7CF0-7FFF --opt=default,+asm,-asmfile,+speed,-space,+debug --addrqual=ignore --mode=pro -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,+plib "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/graphic.p1 graphic.c "C:\Program Files (x86)\Microchip\xc8\v1.12\bin\xc8.exe" --chip=18F25K20 -G -mdist/default/production/oled_SSD1306_8080G.X_web.production.map --double=24 --float=24 --emi=wordwrite --rom=default,-7CF0-7FFF --opt=default,+asm,-asmfile,+speed,-space,+debug --addrqual=ignore --mode=pro -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,+plib "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -odist/default/production/oled_SSD1306_8080G.X_web.production.cof build/default/production/mail.p1 build/default/production/graphic.p1 Microchip MPLAB XC8 C Compiler V1.12 Copyright (C) 2012 Microchip Technology Inc. :: warning: (1273) Omniscient Code Generation not available in Free mode :0: error: (1347) can't find 0x2E8 words (0x2e8 withtotal) for psect "text10" in class "CODE" (largest unused contiguous range 0x154) :0: error: (1347) can't find 0x15C words (0x15c withtotal) for psect "text15" in class "CODE" (largest unused contiguous range 0x154) :0: error: (1347) can't find 0x11E words (0x11e withtotal) for psect "text16" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0xD4 words (0xd4 withtotal) for psect "text11" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0xBC words (0xbc withtotal) for psect "text20" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0xA8 words (0xa8 withtotal) for psect "text21" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x84 words (0x84 withtotal) for psect "text3" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x74 words (0x74 withtotal) for psect "text7" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x69 words (0x69 withtotal) for psect "idataBANK1" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x64 words (0x64 withtotal) for psect "cinit" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x62 words (0x62 withtotal) for psect "text22" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x40 words (0x40 withtotal) for psect "text8" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x40 words (0x40 withtotal) for psect "text13" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x3E words (0x3e withtotal) for psect "text24" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x32 words (0x32 withtotal) for psect "text1" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x24 words (0x24 withtotal) for psect "text23" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x1A words (0x1a withtotal) for psect "text19" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x16 words (0x16 withtotal) for psect "text2" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x12 words (0x12 withtotal) for psect "text17" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0x12 words (0x12 withtotal) for psect "text18" in class "CODE" (largest unused contiguous range 0xA) :0: error: (1347) can't find 0xE words (0xe withtotal) for psect "idataBANK0" in class "CODE" (largest unused contiguous range 0xA) :0: advisory: (1) too many errors (21) (908) exit status = 1 nbproject/Makefile-default.mk:132: recipe for target 'dist/default/production/oled_SSD1306_8080G.X_web.production.hex' failed make[2]: *** [dist/default/production/oled_SSD1306_8080G.X_web.production.hex] Error 1 make[2]: Leaving directory 'Z:/Electronique/SSD1306/oled_SSD1306_8080G.X_web/oled_SSD1306_8080G.X_web' nbproject/Makefile-default.mk:75: recipe for target '.build-conf' failed make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 make[1]: Leaving directory 'Z:/Electronique/SSD1306/oled_SSD1306_8080G.X_web/oled_SSD1306_8080G.X_web' nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
BUILD FAILED (exit value 2, total time: 13s) Many thanks,
|
|
« Last Edit: October 07, 2014, 09:12:55 21:12 by lcn »
|
Logged
|
|
|
|
Catcatcat
Senior Member
  
Offline
Posts: 444
Thank You
-Given: 289
-Receive: 1747
|
 |
« Reply #11 on: October 11, 2014, 07:51:55 19:51 » |
|
But try these files, I used it in a project with the radio receiver used indicative serial I2C. Video work with display http://youtu.be/PMQ2pezKwzI
|
|
|
Logged
|
|
|
|
lcn
Junior Member

Offline
Posts: 42
Thank You
-Given: 15
-Receive: 1
|
 |
« Reply #12 on: October 23, 2014, 09:58:31 09:58 » |
|
Thanks,
In your web site what code should I download if I want to use SSD1306 working with SPI interface ?
|
|
|
Logged
|
|
|
|
Catcatcat
Senior Member
  
Offline
Posts: 444
Thank You
-Given: 289
-Receive: 1747
|
 |
« Reply #13 on: October 23, 2014, 06:27:17 18:27 » |
|
I did not have such a need, therefore, with the driver I used only I2C. In the near future I will return to this indicator is not planned. SPI I have only used the driver SEPS114A.
|
|
|
Logged
|
|
|
|
lcn
Junior Member

Offline
Posts: 42
Thank You
-Given: 15
-Receive: 1
|
 |
« Reply #14 on: October 24, 2014, 09:36:55 09:36 » |
|
Thanks, i will use I2C circuitry then. I can't register on your website, so i can't download your lastest SSD1306 driver.
Does your library will work with any screen size : 0.96" or 1.3" or, it needs to be modified to get it working with 1.3" screens ?
|
|
|
Logged
|
|
|
|
Catcatcat
Senior Member
  
Offline
Posts: 444
Thank You
-Given: 289
-Receive: 1747
|
 |
« Reply #15 on: October 24, 2014, 07:23:31 19:23 » |
|
Will work with any display size. Try again to join and I will check that there is not obtained.
|
|
|
Logged
|
|
|
|
lcn
Junior Member

Offline
Posts: 42
Thank You
-Given: 15
-Receive: 1
|
 |
« Reply #16 on: October 25, 2014, 10:38:28 10:38 » |
|
Thanks CATCAT, i received a password to log-in on your website. However i did not find the XC8 project archive for SSD1306, can you tell me where i could download it ?
Could i use any PIC18 MCU with I2C interface ? Is the crystal ( Fosc ) speed is very important for SSD1306 ?
|
|
|
Logged
|
|
|
|
Catcatcat
Senior Member
  
Offline
Posts: 444
Thank You
-Given: 289
-Receive: 1747
|
 |
« Reply #17 on: October 26, 2014, 06:05:57 06:05 » |
|
|
|
|
Logged
|
|
|
|
lcn
Junior Member

Offline
Posts: 42
Thank You
-Given: 15
-Receive: 1
|
 |
« Reply #18 on: October 27, 2014, 01:14:31 13:14 » |
|
Thanks CATCAT
I try to build a lab board in order to connect an OLED screen inspired from schematic. I can't find any components supplier that sells inductor L1 : 2.2 - 47 uH
What is the brand of the part "DE070x" ? Can you tell me where your order that part ?
The datasheet suggests to use one of the following, but Farnell and Radiospare do not have those in stock either :
for TPS61040 : 10 mH Sumida CR32-100 10 mH Sumida CDRH3D16-100 10 mH Murata LQH4C100K04 4.7 mH Sumida CDRH3D16-4R7 4.7 mH Murata LQH3C4R7M24
|
|
|
Logged
|
|
|
|
Catcatcat
Senior Member
  
Offline
Posts: 444
Thank You
-Given: 289
-Receive: 1747
|
 |
« Reply #19 on: October 28, 2014, 05:23:27 05:23 » |
|
may use any inductor and any upconverter. One condition that would have been required on the output voltage.
|
|
|
Logged
|
|
|
|
lcn
Junior Member

Offline
Posts: 42
Thank You
-Given: 15
-Receive: 1
|
 |
« Reply #20 on: November 07, 2014, 05:16:59 17:16 » |
|
Hello Catcatcat I've received my SSD1306 OLED 0.96" screens.  I try to adapt your I2C library to work in SPI 4 wires mode ( DC, CS, MOSI, SCK ) I'm able to display demo characters on the screen but i have a question please : In this line, why X argument, that is used for setting X position is negative : -1 ? String_OLED("catcatcat.d-lan.dp.ua",0,0,0,-1,1);
|
|
« Last Edit: November 07, 2014, 05:51:00 17:51 by lcn »
|
Logged
|
|
|
|
Catcatcat
Senior Member
  
Offline
Posts: 444
Thank You
-Given: 289
-Receive: 1747
|
 |
« Reply #21 on: November 09, 2014, 06:15:14 06:15 » |
|
hi, if the argument is negative, the function is activated alignment line on the middle of the screen. This is convenient when you need to display a character string exactly in the middle of the display (without calculation beginning on X).
|
|
|
Logged
|
|
|
|
lcn
Junior Member

Offline
Posts: 42
Thank You
-Given: 15
-Receive: 1
|
 |
« Reply #22 on: November 09, 2014, 02:01:55 14:01 » |
|
I found that when using larger character size, argument -1 does not align the string properly on the screen String_OLED("OLED Display",0,4,4,-1,2); However it works properly when i use width and height = 0 It looks that '-1' argument does not work with symbol_OLED function, do you confirm '-1' only work with strings ? -- I did not understand what is the purpose of ticker_OLED and tickerB_OLED, i do not know how they work Can you explain me please ? -- How could i scroll a string horizontaly, is there a function to do that ? -- I do not find rectangle, line, point function in your I2C library, they only exist in 8080G, I tried to adapt them for SPI 4 wires use, but i did not success, the following defines get troubles and compiler don't want them : #define bitset (var, bitno) ((var) |= 1 << (bitno)); // set #define bitclr (var, bitno) ((var) &= ~ (1 << (bitno))); // reset
|
|
« Last Edit: November 10, 2014, 12:06:05 12:06 by lcn »
|
Logged
|
|
|
|
Catcatcat
Senior Member
  
Offline
Posts: 444
Thank You
-Given: 289
-Receive: 1747
|
 |
« Reply #23 on: November 10, 2014, 05:54:49 17:54 » |
|
I did not understand what is the purpose of ticker_OLED and tickerB_OLED, i do not know how they work Can you explain me please ?
only for character strings I did not understand what is the purpose of ticker_OLED and tickerB_OLED, i do not know how they work Can you explain me please ? it "tickers". ticker_OLED - designed to output strings stored in the program memory type const tickerB_OLED - to output a character array formed in memory
|
|
|
Logged
|
|
|
|
lcn
Junior Member

Offline
Posts: 42
Thank You
-Given: 15
-Receive: 1
|
 |
« Reply #24 on: November 10, 2014, 06:04:27 18:04 » |
|
Thanks, How could i scroll a string horizontaly, is there a function to do that ? something like this : http://www.youtube.com/watch?v=7-yIYsKFQ1Y
|
|
|
Logged
|
|
|
|
|