Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 21st June 2009, 02:07 AM   #151
Default

if you leave the BMP as one big block then you can just:
Code:
void lcd_setbmp(const char *bmp, char set_clr) {
	char i, j;

	for (i=0; i<=8; i++)
		for (j=0; j<=132; j++)
			lcd_write_byte(i, j, *bmp++, NORMAL);//[i][j], NORMAL);


}
also why are you using 132? if its 96 pixels wide? or is this another thing to fit that controller

Last edited by AtomSoft; 21st June 2009 at 02:08 AM.
AtomSoft is online now  
Old 21st June 2009, 02:44 AM   #152
Default

Hey i was using your new code and notice it doesnt let me write a character pass a certain point look:

Code:
		lcd_setrect(0,0,95,64,SET);
		lcd_setrect(52,0,95,64,SET);
		lcd_setrect(52,40,16,64,SET);

		lcd_str(55,42,"OK",NORMAL);
		lcd_str(55,7,"ItemA",NORMAL);
		lcd_str(55,58,"ItemA",NORMAL);
Attached Thumbnails
Graphic LCD 96x64 w/ SED1565 Controller-asd.jpg  
AtomSoft is online now  
Old 21st June 2009, 02:46 AM   #153
Default

Ya, those are the line and circle functions I used. rectangle too:

Code:
void lcd7110_set_rect(int x0, int y0, int x1, int y1)
{
    lcd7110_set_line(x0, y0, x1, y0);
    lcd7110_set_line(x0, y1, x1, y1);
    lcd7110_set_line(x0, y0, x0, y1);
    lcd7110_set_line(x1, y0, x1, y1);
}
Writing each pixel individually just doesn't work for me. For an 8x6 character you are setting/clearing each bit individually and doing 4 writes to the LCD for each pixel. That's 192 writes to the LCD for each character. I'd like to do scrolling and that would totally kill a large write of characters to the screen.

Currently I'm tracking each page that is changed and doing a quick write of the page lines that have changed when I call a refresh. I'd like to have it track more specific page/columns that changed, but I'm not certain if that's necessary. A page line refresh is quicker than I can detect and even when writing a circle or rectangle that goes over multiple pages, I can't actually see the writing.

Here's my code. AT91SAM7S256 - Compiles under Crossworks or GCC ARM.
I was going to clean this up and add some comments, but I went out all day today. I don't know when I'll get to this again, so here it is.
http://www.higginstribe.com/sam7/lcd...cd7110_0.1.zip
__________________
Mark Higgins
DirtyLude is offline  
Old 21st June 2009, 11:22 AM   #154
Default

Jason:

I think I was limiting the right edge to a certain point, it is in either lcd_write_byte() or lcd_write_chr() - they do a boundary check, on illegal char or illegal address at the begining of the function call.

I think the lcd_write_byte() can be significantly improved while preserving portability. it is literally drawing the char bit by bit, thus the slow speed.
millwood is offline  
Old 21st June 2009, 11:49 AM   #155
Default

"I'd like to do scrolling and that would totally kill a large write of characters to the screen."

on scrolling: if you dynamically move the comm line, it will cause the entire screen to scroll - it is mentioned in the datasheet and it worked when I tried it.
millwood is offline  
Old 21st June 2009, 01:40 PM   #156
Default

Quote:
Originally Posted by millwood View Post
on scrolling: if you dynamically move the comm line, it will cause the entire screen to scroll - it is mentioned in the datasheet and it worked when I tried it.
Cool, thanks. I don't know if I'll have time to look at all this again for a few days at least.
__________________
Mark Higgins
DirtyLude is offline  
Old 22nd June 2009, 02:22 AM   #157
Default

I just ordered two of these from dipmicro. I just need something to read out the values of a few variables, hopefully with all the code you guys have posted that shouldn't be too hard. Thanks!
Triode is offline  
Old 23rd June 2009, 02:21 AM   #158
Default

The smooth scroll works, but it's a little disappointing. It looks like the refresh rate of the LCD itself is to blame, but it kinda blinks as it moves from one frame to another. Sending a whole page of data to the screen is actually very fast, and there is no detectable delay from the top of the screen to the bottom.

The slight blink makes the scroll a little jarring to look at.
__________________
Mark Higgins
DirtyLude is offline  
Old 29th June 2009, 10:05 PM   #159
Default

Back to this old thread, but I found out something pretty bizarre just now. I took off my LCD PCB off the breadboard in order measure how much current it pulls, because my ground and power lines are hidden under the PCB, only to find that I've never attached the power wire, only the ground. All this time, it looks like my LCD has been powered by the data lines alone. Not certain how this works, but it does. So, I'm just shrugging my shoulders over this one.

I ported over a simplified text only library to the MSP430 and I have the whole processor and LCD running on a CR2032 battery. It's pretty cool, because with no sleep mode or any power saving and full clock, it all takes 2.3mA, which should last 95 hours on a CR2032 coin cell battery.
__________________
Mark Higgins
DirtyLude is offline  
Old 29th June 2009, 10:21 PM   #160
Default

awesome! so my remote is very do-able with 2-4AA batteries

I plan on buying a XLP:
PIC MCUs with nanoWatt XLP(tm) technology for extreme low power and battery applications

Since it can save alot of energy and have it in DEEP sleep most of the time and 1 button to wakeup. this way it will last long without a recharge.

EDIT:

Most likely ill get a PIC18F46J50 to test it out and see how much current the entire project takes in sleep/deep sleep/normal operations

Last edited by AtomSoft; 29th June 2009 at 11:05 PM.
AtomSoft is online now  
Old 3rd July 2009, 02:21 AM   #161
Default

Just thought id share this:

Last edited by AtomSoft; 3rd July 2009 at 02:21 AM.
AtomSoft is online now  
Old 3rd July 2009, 03:08 AM   #162
Default

I just got mine in the mail. I only have 5 and 12V regulators, do you think it would do ok with 5v?
Triode is offline  
Old 3rd July 2009, 12:04 PM   #163
Default

if you check my ebay listing it says yes I have some for sale too

I have been using it on 5v for a while now and no issue. Im not 100% sure of the long term use but it seems to be fine on 5v.
AtomSoft is online now  
Old 5th July 2009, 10:30 PM   #164
Default

Hey guys this might be a dumb question but is ROM editable?
Like if i use :
Code:
unsigned rom char someVar[20];
Can i edit these values?

Last edited by AtomSoft; 5th July 2009 at 10:30 PM.
AtomSoft is online now  
Old 5th July 2009, 10:40 PM   #165
Default

Quote:
Originally Posted by AtomSoft View Post
Hey guys this might be a dumb question but is ROM editable?
Like if i use :
Code:
unsigned rom char someVar[20];
Can i edit these values?
I am not sure what you mean by editable?

You can set their value at compile time. (In the source code)
You can not change their value during run time.

The values are stored in flash.
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)

Last edited by 3v0; 5th July 2009 at 10:43 PM.
3v0 is online now  
Reply

Tags
96x64, controller, graphic, lcd, nokia7110, sed1565, w or

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Graphic LCD baberjaved Micro Controllers 2 13th November 2007 05:01 PM
Graphic LCD flemmard Micro Controllers 1 13th September 2007 03:32 AM
interfacing of PIC16F877A with graphic LCD controller T6963c rosamma Micro Controllers 1 24th March 2007 12:29 PM
graphic LCD PIC MCU tom_electronic Micro Controllers 4 28th February 2006 12:29 PM
graphic lcd help jijita General Electronics Chat 1 18th August 2004 07:32 AM



All times are GMT. The time now is 12:21 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker