UTFT component? perfect for many graphic displays
Moderator: Benj
Forum rules
Only feature requests will be considered here. General questions should not be posted in this forum.
Only feature requests will be considered here. General questions should not be posted in this forum.
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Sorry but no go.
Just to clarify,
on my breakout board for the SSD1306 display I have connected it like this:
PINOUT - FC Connection
4-CS# - (CS)
5-RES# - (RST)
6-D/C# - (RS)
7-SCLK - (SCK)
8-SDIN - (SD)
Correct?
Just to clarify,
on my breakout board for the SSD1306 display I have connected it like this:
PINOUT - FC Connection
4-CS# - (CS)
5-RES# - (RST)
6-D/C# - (RS)
7-SCLK - (SCK)
8-SDIN - (SD)
Correct?
- Attachments
-
- SSD1306_BUF_PIC18F26K80.fcfx
- (5.55 KiB) Downloaded 447 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Cheers, There must be something else I've missed, I'll have another peruse through.
Your connections look good to me.
Your connections look good to me.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Looks like I missed the final "switch on the display" 0xAF command from the initialise routine. Fingers crossed this will work.
- Attachments
-
- gLCD_SSD1306_buffered.fcpx
- (7.2 KiB) Downloaded 440 times
-
- gLCD_SSD1306.fcpx
- (6.78 KiB) Downloaded 426 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Ah!
Now it turns on, but some(most?) routines are not working as they should
The clear display command don't work, the top "row" of 8 pixels are all on, probably from the clear display command.
The rest (next 3 rows of the display) is filled with random pixels.
Swapping the foreground and background colors in the component properties makes the top "row" pixels all OFF with the clear display command otherwise same as above.
I'm going through the other macros but the print number and print text ones don't seem to work either
Drawing a rectangle is working, draw a line too I think
The macros for changing foreground and background colors seems to do nothing. Changing the component properties seems to be the only way to change this.
Now it turns on, but some(most?) routines are not working as they should
The clear display command don't work, the top "row" of 8 pixels are all on, probably from the clear display command.
The rest (next 3 rows of the display) is filled with random pixels.
Swapping the foreground and background colors in the component properties makes the top "row" pixels all OFF with the clear display command otherwise same as above.
I'm going through the other macros but the print number and print text ones don't seem to work either
Drawing a rectangle is working, draw a line too I think
The macros for changing foreground and background colors seems to do nothing. Changing the component properties seems to be the only way to change this.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Hello,
The clear function was assuming that at the end of page 0 we move automatically to page 1 which I guess is not how the hardware works.
I've had a go at fixing the clear function and the set colour functions so let me know how your getting on with this and if it's ok i'll roll out the change to the 1305 comps.
The clear function was assuming that at the end of page 0 we move automatically to page 1 which I guess is not how the hardware works.
I've had a go at fixing the clear function and the set colour functions so let me know how your getting on with this and if it's ok i'll roll out the change to the 1305 comps.
- Attachments
-
- gLCD_SSD1306.fcpx
- (6.69 KiB) Downloaded 454 times
-
- gLCD_SSD1306_buffered.fcpx
- (7.21 KiB) Downloaded 434 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Now it goes 100% on when initialise but one pixel is then turned off. I would guess pixel row 0 column 16 or so.
Then nothing will work after this.
It might be easier and way more efficient if we hold off until you have these displays in your hands? (Even if I reaaaaally want these to work now now now )
I don't mind testing, not at all, but it makes more sense for you to try on hardware no?
Then nothing will work after this.
It might be easier and way more efficient if we hold off until you have these displays in your hands? (Even if I reaaaaally want these to work now now now )
I don't mind testing, not at all, but it makes more sense for you to try on hardware no?
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: UTFT component? perfect for many graphic displays
For the SSD1305 there are several options on how to interface them
Which would you recommend?
4-Wire SPI?
8080-8Bit?
I2C?
For the SSD1306 there was really only 4-Wire SPI available according to the datasheet for my display (ER-OLED0.91-1)
Which would you recommend?
4-Wire SPI?
8080-8Bit?
I2C?
For the SSD1306 there was really only 4-Wire SPI available according to the datasheet for my display (ER-OLED0.91-1)
- Attachments
-
- ER-OLED0.91-2_Interfacing.pdf
- (144.72 KiB) Downloaded 457 times
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: UTFT component? perfect for many graphic displays
I think we should concentrate on SSD1306 as it is a more commonly used display controller.
If you could send me a PM with the address you want me to send a display to, I'll have it out with the mail tomorrow.
/Daniel S
If you could send me a PM with the address you want me to send a display to, I'll have it out with the mail tomorrow.
/Daniel S
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Hello Daniel,
This address is great:
Ben Rowland
Matrix Technology Solutions Ltd
The Factory
33 Gibbet Street
Halifax
West Yorkshire
HX1 5BA
UK
As for which version to use well it depends which version you have available to purchase. Seems a lot of these controller ICs have multiple ways in (6080, 8080, I2C, SPI) but often the display manufacturers will jump on one method and only support that on the PCB.
This address is great:
Ben Rowland
Matrix Technology Solutions Ltd
The Factory
33 Gibbet Street
Halifax
West Yorkshire
HX1 5BA
UK
As for which version to use well it depends which version you have available to purchase. Seems a lot of these controller ICs have multiple ways in (6080, 8080, I2C, SPI) but often the display manufacturers will jump on one method and only support that on the PCB.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Alright, it's going out with tomorrows mail.
And I bought a bunch from http://www.buydisplay.com/
http://www.buydisplay.com/default/0-91- ... e-on-black
And I bought a bunch from http://www.buydisplay.com/
http://www.buydisplay.com/default/0-91- ... e-on-black
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Just thought I would let you know that I sent you my 0.91" LED SSD1306 yesterday.
Here's a photo so you can see the pin-out legend
Here's a photo so you can see the pin-out legend
- RobH
- Posts: 95
- Joined: Wed Sep 11, 2013 7:51 pm
- Has thanked: 29 times
- Been thanked: 17 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Could you also add support for this model:
http://www.microsofttranslator.com/bv.a ... ves%2F1358
It only has 4 pins. More info on how some people got it working on Arduino here
http://forum.arduino.cc/index.php?PHPSE ... c=219419.0
Thanks!
http://www.microsofttranslator.com/bv.a ... ves%2F1358
It only has 4 pins. More info on how some people got it working on Arduino here
http://forum.arduino.cc/index.php?PHPSE ... c=219419.0
Thanks!
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Hello,
Received the display now and will have a go at getting it working. Can you confirm what voltages you are placing onto the VDD and VBATT pins just so I can be sure of not damaging the display before I get started on the coding.
Looks like 3V3 on both pins should be ok.
Once this display is working the I2C version should be simple enough so I will look into this too.
Received the display now and will have a go at getting it working. Can you confirm what voltages you are placing onto the VDD and VBATT pins just so I can be sure of not damaging the display before I get started on the coding.
Looks like 3V3 on both pins should be ok.
Once this display is working the I2C version should be simple enough so I will look into this too.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Hello,
I found a couple of bugs regarding colour assignment and everything now seems to be working great.
Here is a simple test file I used for the buffered (no read functionality) display you sent over.
Let me know if you find anything further and I will investigate for you while I still have the hardware handy. If everything is ok then I'll pop the display back in the post for you.
I found a couple of bugs regarding colour assignment and everything now seems to be working great.
Here is a simple test file I used for the buffered (no read functionality) display you sent over.
Let me know if you find anything further and I will investigate for you while I still have the hardware handy. If everything is ok then I'll pop the display back in the post for you.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Here is a version of the buffered SSD1306 component but with an I2C interface instead of the more common one way SPI interface.
Let me know how you get on.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- RobH
- Posts: 95
- Joined: Wed Sep 11, 2013 7:51 pm
- Has thanked: 29 times
- Been thanked: 17 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Benj,
That works for the i2c version but the display runs SLOOOOOOOOOOW. This little GLCD sdoes not send an acknowledgement. Is that something that could be slowing things down?
That works for the i2c version but the display runs SLOOOOOOOOOOW. This little GLCD sdoes not send an acknowledgement. Is that something that could be slowing things down?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Hello,
Ok thanks for letting me know. I have used the software I2C CAL to get around the missing Ack signal so this shouldn't be causing any slow down. I have also found a slight optimisation which should speed up the display a little.
One other thing you can try is to overclock the I2C connection. To do this you can try updating the CAL file in your Flowcode v6/CAL/PIC directory with the attached file. Note that this is a bit of a hack so I would recommend making a copy of the original file and only using this to try and speed up the display.
Let me know how you get on.
Ok thanks for letting me know. I have used the software I2C CAL to get around the missing Ack signal so this shouldn't be causing any slow down. I have also found a slight optimisation which should speed up the display a little.
One other thing you can try is to overclock the I2C connection. To do this you can try updating the CAL file in your Flowcode v6/CAL/PIC directory with the attached file. Note that this is a bit of a hack so I would recommend making a copy of the original file and only using this to try and speed up the display.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- RobH
- Posts: 95
- Joined: Wed Sep 11, 2013 7:51 pm
- Has thanked: 29 times
- Been thanked: 17 times
- Contact:
Re: UTFT component? perfect for many graphic displays
I'll try a different chip (currently on 18f25k50 INTOSC 16mhz) before I go further, but I wanted to give you feedback on the latest files you uploaded.
The GLCD update did nothing to improve speed. Granted, I haven't actually used the i2c pins of this chip, but only other digital pins.
The i2c.c file gave me multiple errors:
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(240:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(240:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(242:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(242:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(264:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(264:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(266:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(266:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(268:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(268:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(291:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(291:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(293:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(293:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(327:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(327:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(329:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(329:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(334:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(334:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(336:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(336:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(372:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(372:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(376:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(376:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(381:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(381:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(391:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(391:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(393:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(393:2): error: failed to generate expression
.
test1.c success
failure
Completed BoostC compilation, return = 1
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18F.exe reported error code 1
I'll test it on a different chip now with the original i2c.c file.
*edit*
18f2550 INTOSC 8mhz using SPI pins same speed issue.
The GLCD update did nothing to improve speed. Granted, I haven't actually used the i2c pins of this chip, but only other digital pins.
The i2c.c file gave me multiple errors:
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(240:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(240:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(242:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(242:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(264:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(264:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(266:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(266:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(268:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(268:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(291:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(291:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(293:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(293:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(327:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(327:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(329:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(329:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(334:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(334:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(336:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(336:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(372:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(372:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(376:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(376:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(381:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(381:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(391:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(391:2): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(393:2): error: unknown identifier 'Nop'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(393:2): error: failed to generate expression
.
test1.c success
failure
Completed BoostC compilation, return = 1
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18F.exe reported error code 1
I'll test it on a different chip now with the original i2c.c file.
*edit*
18f2550 INTOSC 8mhz using SPI pins same speed issue.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Hello,
Right this updated C file should hopefully resolve the compile error and allow the display to run faster. It might bring the I2C out of spec but worth a quick go.
The 18F2550 can run up to 48MHz (12MIPs) using the onboard PLL, the faster you can get the oscillator to run the faster the display will operate. At 8MHz the device is operating at roughly 2MIPs.
Let me know how you get on.
Right this updated C file should hopefully resolve the compile error and allow the display to run faster. It might bring the I2C out of spec but worth a quick go.
The 18F2550 can run up to 48MHz (12MIPs) using the onboard PLL, the faster you can get the oscillator to run the faster the display will operate. At 8MHz the device is operating at roughly 2MIPs.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- RobH
- Posts: 95
- Joined: Wed Sep 11, 2013 7:51 pm
- Has thanked: 29 times
- Been thanked: 17 times
- Contact:
Re: UTFT component? perfect for many graphic displays
The latest C file you posted compiled, but the screen shows nothing now. I would be happy to send you one of these little LCDs for tinkering purposes. You can keep it afterwards.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Hello Rob,
The section I changed in the file looks like this and is on line 139 and 140.
The commented out line is the line from the original file, the line below is a replacement delay for the I2C and instead of waiting 1 micro second it instead waits 1 instruction which may be way too fast for the display to detect.
You could try something like this as a bit of a half way house.
You can keep adding the nops until the display fires up and hopefully this will be quicker then it was with the fixed 1us delay.
I will accept a display for testing if you would like to send us one but with it being this close to working well it's really up to you.
The section I changed in the file looks like this and is on line 139 and 140.
Code: Select all
//#define MX_I2C_DELAY delay_us(1);
#define MX_I2C_DELAY nop();
You could try something like this as a bit of a half way house.
Code: Select all
//#define MX_I2C_DELAY delay_us(1);
#define MX_I2C_DELAY nop();nop();nop();nop();
I will accept a display for testing if you would like to send us one but with it being this close to working well it's really up to you.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- RobH
- Posts: 95
- Joined: Wed Sep 11, 2013 7:51 pm
- Has thanked: 29 times
- Been thanked: 17 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Code: Select all
//#define MX_I2C_DELAY delay_us(1);
#define MX_I2C_DELAY nop();nop();
http://youtu.be/LoyxRrzoh_w
Here's the fcfx file:
- Attachments
-
- glcd_test1.fcfx
- (5.26 KiB) Downloaded 348 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Hi Rob,
Wow that's still very slow! Are you still running the microcontroller at 8MHz? Might be worth clocking it up to 48MHz by enabling the PLL in the config settings and seeing if you can get it any faster but that is very slow.
Now the way the driver is currently working for each pixel being sent out is like this.
I2C transaction to set XY location.
I2C transaction to set pixel value.
This is what I do for the SPI types of display but SPI can run a lot faster then I2C and has less overhead.
Now there are some options.
1) We dont ever talk to the display until the contents have all been drawn to the local RAM buffer. This might be quite quick but involves redrawing the entire display each time we want to change something.
2) We check to see if the pixel value has changed since the last operation in which case we don't resend the new value, probably won't speed things up too much but pretty easy to do and should help.
3) We try and bundle things like text prints up into bytes so we can send 8 pixels at once rather then 1 at a time but this limits where you can position your text on the display.
4) As with option 1 but we also store the changes since the last redraw making the refresh process more efficient. Heavy on RAM usage.
5) Try and reduce the number of XY position settings by keeping track of where we were and only sending new coords when necessary. Good for things like clear and box drawing.
I'll have a quick crack at options 2 and 5 for you and see if these help at all.
Wow that's still very slow! Are you still running the microcontroller at 8MHz? Might be worth clocking it up to 48MHz by enabling the PLL in the config settings and seeing if you can get it any faster but that is very slow.
Now the way the driver is currently working for each pixel being sent out is like this.
I2C transaction to set XY location.
I2C transaction to set pixel value.
This is what I do for the SPI types of display but SPI can run a lot faster then I2C and has less overhead.
Now there are some options.
1) We dont ever talk to the display until the contents have all been drawn to the local RAM buffer. This might be quite quick but involves redrawing the entire display each time we want to change something.
2) We check to see if the pixel value has changed since the last operation in which case we don't resend the new value, probably won't speed things up too much but pretty easy to do and should help.
3) We try and bundle things like text prints up into bytes so we can send 8 pixels at once rather then 1 at a time but this limits where you can position your text on the display.
4) As with option 1 but we also store the changes since the last redraw making the refresh process more efficient. Heavy on RAM usage.
5) Try and reduce the number of XY position settings by keeping track of where we were and only sending new coords when necessary. Good for things like clear and box drawing.
I'll have a quick crack at options 2 and 5 for you and see if these help at all.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- RobH
- Posts: 95
- Joined: Wed Sep 11, 2013 7:51 pm
- Has thanked: 29 times
- Been thanked: 17 times
- Contact:
Re: UTFT component? perfect for many graphic displays
As far as I know, the current chip (18F25K50 - I changed it again from the 18F2550) is running at 48mhz... That's another reason I posted the fcfx files for you.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: UTFT component? perfect for many graphic displays
Hi Rob,
Right ok no probs, looks like it's down to me then
Please can you give this a try and see if were making any progress. This has optimisations for the pixel printing and display clearing as reported before in 2 and 5.
Right ok no probs, looks like it's down to me then
Please can you give this a try and see if were making any progress. This has optimisations for the pixel printing and display clearing as reported before in 2 and 5.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel