CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug Reports on this forum. Send them to support@ccsinfo.com

PIC24EP OLED driver question [SOLVED]
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
temtronic



Joined: 01 Jul 2010
Posts: 6157
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Dec 28, 2017 7:03 am     Reply with quote

I was going to check the driver to see if '# of allowable characters per line vs text mode' is there but of course Windows somehow 'lost', or 'misplaced' or otherwise MOVED my copy to 'Lala land'.It WAS there yesterday...sigh

Something like a variable called MaxCharactersSmallTextMode.....
I know you know what I mean, I'm just trying to delay going out in -22*C weather to shovel the 4 car driveway....

Jay
MikeW



Joined: 15 Sep 2003
Posts: 168
Location: Warrington UK

View user's profile Send private message

PostPosted: Thu Dec 28, 2017 8:25 am     Reply with quote

@Ttelmah

been in hospital, but hope to try it over the next week.

will keep you posted
benoitstjean



Joined: 30 Oct 2007
Posts: 299
Location: Ottawa, Ontario, Canada

View user's profile Send private message

PostPosted: Thu Dec 28, 2017 8:27 am     Reply with quote

Hi Ttelmah,

Thanks for the offer on the 'big font' but what you provided in the driver is more than enough for me considering the tiny size of the screen.

Thanks for all your help, it is always appreciated and nice to know that we can count on real people to help resolve issues rather than just browsing the net!

On another note, it's a cool -37*C this morning here in Ottawa with the windchill.

I'll stay inside and program away with my coffee!

Ben
Ttelmah



Joined: 11 Mar 2010
Posts: 13269

View user's profile Send private message

PostPosted: Thu Dec 28, 2017 10:04 am     Reply with quote

I'm sitting gently laughing.
Only about -2C, and a dusting of snow.

One of my old employees and friends, has gone over to Canada for a holiday immediately after Christmas, and another old friend emigrated some time ago, so I'm watching the Canadian temperatures with interest.... Smile
Ttelmah



Joined: 11 Mar 2010
Posts: 13269

View user's profile Send private message

PostPosted: Fri Dec 29, 2017 3:28 am     Reply with quote

MikeW wrote:
@Ttelmah

been in hospital, but hope to try it over the next week.

will keep you posted


Hope you are OK now?.
Hospital at Christmas time is a thing I experienced a few years ago. :(
MikeW



Joined: 15 Sep 2003
Posts: 168
Location: Warrington UK

View user's profile Send private message

PostPosted: Fri Dec 29, 2017 6:02 am     Reply with quote

@Ttelmah

I am getting out of rom, segment too large errors on my PIC16F1829 kit, so I will try the PIC18 and see how it goes.

it compiles with a PIC18F26J50, so now to wire it up !!!.

I guess big fonts will be no use with the PIC16, that's a shame because they are smaller both in pin count, and cost of course.

The big fonts are useful for things like just displaying 3 or 4 digits of say temperature, or speed.
Ttelmah



Joined: 11 Mar 2010
Posts: 13269

View user's profile Send private message

PostPosted: Fri Dec 29, 2017 6:29 am     Reply with quote

Yes. The key with the original routines, was to allow use on chips with little ROM/RAM. This was why I kept the font small. Add complexity to the font, and while your RAM use is still small, the font gets a lot larger...
That's the balancing act.
MikeW



Joined: 15 Sep 2003
Posts: 168
Location: Warrington UK

View user's profile Send private message

PostPosted: Fri Dec 29, 2017 6:41 am     Reply with quote

I will try to cut down a big font to just use 0-9 characters, and see how it goes.
temtronic



Joined: 01 Jul 2010
Posts: 6157
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Dec 29, 2017 6:51 am     Reply with quote

well 'theory' says the ROM space whould be reduced to 1/4, sortof...
10 #s, 26 letters = 36 characters ... 36/10 = +-4

also perhaps you could eliminate parts of the driver you'll never use ?? yeah, they'll go back in 3 days from now !!

hay it's rough but I'm cold, only -14*C aka 10*F here today.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 13269

View user's profile Send private message

PostPosted: Fri Dec 29, 2017 8:14 am     Reply with quote

The original font also contains the extra characters for punctuation, and the bar graph. If you just select the numbers and decimal, you can reduce it a lot. Smile
MikeW



Joined: 15 Sep 2003
Posts: 168
Location: Warrington UK

View user's profile Send private message

PostPosted: Fri Dec 29, 2017 10:53 am     Reply with quote

@Ttelmah

I cut down the big fonts, at lower case a-z.

it compiles and runs on the PIC16LF1829.

see photos.

observations -

all of the big fonts give the same nice character, but one size, and too small.

\n\r seems to screw up the line

how does one add a jpg image to this post ?
Ttelmah



Joined: 11 Mar 2010
Posts: 13269

View user's profile Send private message

PostPosted: Fri Dec 29, 2017 1:06 pm     Reply with quote

As explained earlier, the basic text output routines do not contain handling for any controls. You would have to encapsulate the one for the large text exactly as the OLED_Putc function does for the standard routine.

The double size font is already only giving 4 lines and 10 characters per line. To enlarge these further seems rather pointless. However if you really want to, copy the doubling system I implemented for the smaller font. However remember also if you double the font, it involves four times the amount of data movement. You'd be performing hundreds of writes for every character. Slow...

Are you using a 0.96" display?. If you want larger text, think about a larger display....
Ttelmah



Joined: 11 Mar 2010
Posts: 13269

View user's profile Send private message

PostPosted: Sun Dec 31, 2017 3:48 pm     Reply with quote

I have done a larger 'numeric only' system for the display. Will send it to Mike first to test, and if he likes it will add it to the code in the library.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group