View previous topic :: View next topic |
Author |
Message |
luizabbadia
Joined: 11 Dec 2007 Posts: 112 Location: rio de janeiro
|
Posted: Sun Dec 27, 2015 1:50 am Post subject: |
|
|
sorry wrong post,wrong duplication,wrong question |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Sun Dec 27, 2015 8:46 am Post subject: |
|
|
Hi luizabbadia,
I think this is the code (I had a harddisk Crash a while ago and lost afew files)
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
luizabbadia
Joined: 11 Dec 2007 Posts: 112 Location: rio de janeiro
|
Posted: Sun Dec 27, 2015 11:34 am Post subject: |
|
|
Many thanks for your attention and quick reply ,Ian! |
|
Back to top |
|
|
luizabbadia
Joined: 11 Dec 2007 Posts: 112 Location: rio de janeiro
|
Posted: Sun Dec 27, 2015 11:46 am Post subject: |
|
|
Yes!! It works...thanks!!
That helped me to debug and find one problem!
A bad contact in the protoboard....
Now Mark´s program works too!!!!
Thanks a lot!! |
|
Back to top |
|
|
luizabbadia
Joined: 11 Dec 2007 Posts: 112 Location: rio de janeiro
|
Posted: Sun Dec 27, 2015 11:51 am Post subject: |
|
|
Ok[/img] |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Sun Dec 27, 2015 12:29 pm Post subject: |
|
|
Hi,
Glad to be of Service.
Ian _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Sat Feb 06, 2016 7:16 pm Post subject: |
|
|
glcdSSD1306.lib not work on Xmega. CPU hangs. In this example even LED flash not work.
Code: | $regfile = "xm256a3budef.dat"
$crystal = 32000000
$hwstack = 100
$swstack = 100
$framesize = 100
Config Osc = Disabled , 32mhzosc = Enabled
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1
Dim Count As Byte
Led Alias Portd.2 : Config Portd.2 = Output
Dim Twi_start As Byte
Config Twic = 400000
I2cinit
$lib "glcdSSD1306.lib"
'************************** Here LED flashes
For Count = 1 To 8
Toggle Led
Waitms 300
Next Count
'************************** After this string CPU hangs
Config Graphlcd = Custom , Cols = 128 , Rows = 64 , Lcdname = "SSD1306"
'************************** Here LED not flashes
Do
Toggle Led
Waitms 100
Loop
End |
|
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5920 Location: Holland
|
Posted: Wed Feb 10, 2016 10:22 pm Post subject: |
|
|
you found out correct. the twi in xmega uses Z. so Z must be saved.
I sent you a driver in support. _________________ Mark |
|
Back to top |
|
|
pier_pe
Joined: 18 Feb 2016 Posts: 19
|
Posted: Fri Aug 26, 2016 11:17 am Post subject: |
|
|
Hello.
I wanted to make your own font style Display 7-segment for SSD1306.
I have drawn all the numbers in the format bmp.
I do not know how to convert bmp format to ASCII table.
Please advice. |
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
|
Back to top |
|
|
pier_pe
Joined: 18 Feb 2016 Posts: 19
|
Posted: Fri Aug 26, 2016 5:40 pm Post subject: |
|
|
Yeah.
I forgot about the Font Editor.
Now I have a beautiful style digit seven segment display.
Thanks a lot. |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Sun Aug 28, 2016 5:20 pm Post subject: |
|
|
Hello all,
holidays off ? OK
I'm just playing with the small oled display
Because I'm lazy, I use the : Config Graphlcd = Custom , Cols = 128 , Rows = 64 , Lcdname = "SSD1306"
nice tool it works fine
many thanks Ben, Ian and Mark !
but impossible to use pset, line or circle
do you have an idea to set/reset one pixel? I will do the sub after
Thanks for your help
JP
My test here :
$regfile = "M328pdef.dat"
$crystal = 16000000
$hwstack = 128
$swstack = 64
$framesize = 128
'$baud = 57600
'----include and lib------------------------------------------------------------------
$include "font8x8.font"
$lib "i2c_twi.lbx" ' we do not use software emulated I2C but the TWI
$lib "glcdSSD1306-I2C.lib" ' override the default lib with this special one
'---- config-------------------------------------------------------------------------
Config Clockdiv = 1
Config Submode = New ' new method for sub
Config Sda = Portc.4
Config Scl = Portc.5
Config I2cdelay = 5 ' the Ds3232 is working only to 100kHz but it's work to 200kHz
Config Twi = 400000
Config Graphlcd = Custom , Cols = 128 , Rows = 64 , Lcdname = "SSD1306"
'----- variables----------------------------------------------------------------------
Dim jbyte as byte, kbyte as Byte
dim jtext as string*3
dim Xbyte as Byte, ybyte as byte
Setfont Font8x8 ' select font
I2cinit
Lcdat 1 , 1 , "BASCOM-AVR"
Lcdat 2 , 10 , "1995-2015"
wait 2
cls
kbyte=1
for Jbyte= 65 to 75
jtext=chr(jbyte)
Lcdat 4, kbyte , jtext;
'waitms 100
kbyte=kbyte+10
next
kbyte=1
for Jbyte= 128 to 138
jtext=chr(jbyte)
Lcdat 5,kbyte , jtext;
kbyte=kbyte+8
next
kbyte=1
for Jbyte= 139 to 149
jtext=chr(jbyte)
Lcdat 6,kbyte , jtext;
kbyte=kbyte+8
next
Lcdat 8 , 5 , "MCS Electronics" , 1
Wait 2
end |
|
Back to top |
|
|
pier_pe
Joined: 18 Feb 2016 Posts: 19
|
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Sun Aug 28, 2016 9:10 pm Post subject: |
|
|
This lib lets do it (uses 1kbytes video buffer in SRAM).
|
|
Back to top |
|
|
|