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 25th May 2009, 01:24 AM   #16
Default

Comp 136 -- Circle-Drawing Algorithms
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is online now  
Old 25th May 2009, 01:30 AM   #17
Default

lol ok ok in about a few hours itll be done . Im hungry
AtomSoft is online now  
Old 25th May 2009, 01:59 AM   #18
Default

Ya, there's other GLCD libraries that you can pull the circle functions out of. You can try the Lynch 6100 library as well. This is the function I adapted out of his library.

Code:
void lcd6100_set_circle(int x0, int y0, int radius, int color)
{
  int f = 1 - radius;
  int ddF_x = 0;
  int ddF_y = -2 * radius;
  int x = 0;
  int y = radius;
  lcd6100_set_pixel(x0, y0 + radius, color);
  lcd6100_set_pixel(x0, y0 - radius, color);
  lcd6100_set_pixel(x0 + radius, y0, color);
  lcd6100_set_pixel(x0 - radius, y0, color);
  While (x < y)
  {
    if (f >= 0)
    {
      y--;
      ddF_y += 2;
      f += ddF_y;
    }
    x++;
    ddF_x += 2;
    f += ddF_x + 1;
    lcd6100_set_pixel(x0 + x, y0 + y, color);
    lcd6100_set_pixel(x0 - x, y0 + y, color);
    lcd6100_set_pixel(x0 + x, y0 - y, color);
    lcd6100_set_pixel(x0 - x, y0 - y, color);
    lcd6100_set_pixel(x0 + y, y0 + x, color);
    lcd6100_set_pixel(x0 - y, y0 + x, color);
    lcd6100_set_pixel(x0 + y, y0 - x, color);
    lcd6100_set_pixel(x0 - y, y0 - x, color);
  }
}
The reason I like these monochrome LCD's and I used the 3310 is they are good for battery operated devices because they use so little power.
__________________
Mark Higgins
DirtyLude is offline  
Old 25th May 2009, 02:21 AM   #19
Default

Thanks! ill try it in a little. just got the food and gonna eat now.
AtomSoft is online now  
Old 25th May 2009, 02:58 AM   #20
Default

Nice work Jason!

I saw on the web page for those displays they have integrated temperature sensor, micro speaker and backlight LEDs all included on the display itself. Now if only I had $2.94...
Mr RB is offline  
Old 25th May 2009, 03:03 AM   #21
Default

These are very cool. And cheap. And work! lol

i have yet to test the temp sensor. It has a button also. The speaker isnt there tho. It has the 2 cirlcles in the middle tho as the connection. Remember this was from a CELL PHONE so im sure the speaker for it would be too small anyway. But you can use the connection as a button if you have a old cell phone and take out the little buttons with that tape on it and place it there. Ill take a picture on how to tomorrow.
AtomSoft is online now  
Old 25th May 2009, 05:21 AM   #22
Default

dude bad news!!!

I tried to make a set pixel command and noticed along the way that since im setting 1 byte at a time and not indiviual pixels that i need to read the old value on the GLCD then OR it with new value to make it look like its setting pixels. Because if i dont i might mistakenly clear a black/on pixel.


EDIT:
More bad news. I need to trace these pinout If i wish to read the GLCD.

A0 = PIN 4 (D/C)(display or control) aka (data or command)(user controlled)
RD = No PIN (data bus is in an output status when this signal is “L”. H = input)(i think pulled high)
WR = No PIN (When R/W = “H”: Read. L = Write)(I think pulled low)

Last edited by AtomSoft; 25th May 2009 at 06:47 AM.
AtomSoft is online now  
Old 25th May 2009, 10:17 PM   #23
Default

Where's the IC for the display? You never posted a picture of the other side of the board.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is online now  
Old 25th May 2009, 10:24 PM   #24
Default

Heh here is the back:
Attached Thumbnails
Graphic LCD 96x64 w/ SED1565 Controller-ecm-a0997-2-back.jpg  
AtomSoft is online now  
Old 26th May 2009, 12:16 AM   #25
Default

I made altered the text function to underline and strike through text. Of course you can do both at the same time if you wish
Here is the code... also it can now take different font sizes. I have 2-8x8 fonts and 1-5x7 font.
Code:
void LCDString(rom unsigned char *str, unsigned char myFont, unsigned char fade, unsigned char typed, unsigned char style){
	char x;
	char y;
	char fontSize,orWith;
	char MyData;

	switch(myFont){
		case 1:
			fontSize = 8;
			break;
		case 2:
			fontSize = 8;
			break;
		case 3:
			fontSize = 5;
			break;
	}
	switch(style){
		case 'u':		//underline
			orWith = 0x80;
			break;
		case 's':		//strikes
			orWith = 0x10;
			break;
		case 0x00:
			orWith = 0x00;
			break;
	}

	while(*str != 0){
		y = *str++;
		y -= 0x20;

		for(x=0;x<fontSize;x++){
			if(myFont == 1)
					MyData = FontA[y][x] | orWith;
			if(myFont == 2)
					MyData = FontB[y][x] | orWith;
			if(myFont == 3)
					MyData = Atom5x8[y][x] | orWith;

			LCD_Send(MyData,1);

			if(fade > 0) 
				Delay1KTCYx(fade);
		}
		if(typed > 0)
			Delay10KTCYx(typed);

	}
}
Here it how it looks:
Attached Thumbnails
Graphic LCD 96x64 w/ SED1565 Controller-undersrike.jpg  
AtomSoft is online now  
Old 26th May 2009, 03:20 AM   #26
Default

Cool. Your 5x7 font needs an extra horizontal pixel between letters.
Mr RB is offline  
Old 26th May 2009, 09:17 AM   #27
Default

I see hot glue melted over the connecting wires to hold them in place. How did you connect the wires - soldered to the lcd connector, or did you plug a breakout board with the matching connector?
VISN is offline  
Old 26th May 2009, 12:01 PM   #28
Default

VISN:
soldered nice observation. I wish i had a breakout

Mr RB:
Yeah i know i was trying to create my own but as you can see im not that good at font creation

you know of a good 5x7 Font already made?

The issue is i scan fonts from top to bottom and left to right like ad would be:
11111100
10000010
10000001
10000001
10000010
10000100
11111000

The first hex is 0xFF and a total of 5 Bytes for me, most fonts are from LEFT to RIGHT then TOP to BOTTOM so most would have a 0xFC instead and be 7 bytes long.
AtomSoft is online now  
Old 26th May 2009, 06:14 PM   #29
Default

heh was bored:
(This video is still being processed. Video quality may improve once processing is complete. )

Last edited by AtomSoft; 26th May 2009 at 06:15 PM.
AtomSoft is online now  
Old 26th May 2009, 06:47 PM   #30
Default

Alrighty smarty. Lets see a program which lets you vary all three values with at least 8 levels per colour =)

By the way, if there's a user of the year award ever given away here, I think your in the running. Between the code, the excellent schematics and the video results it's all top notch posted right there for everyone to see. Good stuff.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian 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 01:10 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker