• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ARM Cortex

AtomSoft

Well-Known Member
#81
hey :D i got another GLCD issue. I know im a pain in the butt.... but when using proteus is it supposed to show like this? I have used the equevilent code on a PIC and it works but for this proteus it doesnt seem to show it right:
Code:
void PutMsg(unsigned char left, unsigned char tLine, unsigned char *msg){
unsigned char side;
screen_left = left;
screen_line = tLine;

		if(screen_left > 64){
			screen_left -= 64;
			SetPin(GLCD_CS1);
			ClrPin(GLCD_CS2);
			side = 1;
		}else{
			SetPin(GLCD_CS2);
			ClrPin(GLCD_CS1);
			side = 0;
		}

		GLCD_Write_Cmd(0xB8+screen_line);
		GLCD_Write_Cmd(0x40+screen_left);

	while(*msg){
		if(screen_left > 63){
			screen_left=0;
			if(side == 0){
				SetPin(GLCD_CS1);
				ClrPin(GLCD_CS2);
				side = 1;		
				GLCD_Write_Cmd(0xB8+screen_line);
				GLCD_Write_Cmd(0x40);
			} else {
				screen_line+=1;
				SetPin(GLCD_CS2);
				ClrPin(GLCD_CS1);
				side = 0;
				GLCD_Write_Cmd(0xB8+screen_line);				
				GLCD_Write_Cmd(0x40);
			}
		}

		PutChar(*msg++);
		screen_left += 8;
		
	}
		
}


If i change the 63 to a 95 it works fine but there are only 64 pixels on each CSx am i right? so this would have to count to 64
 

Attachments

Thread starter #82
you will have to consult the datasheet for your display for that. for some of them, you just pull down both cs0/cs1 and tread both halves as one continuous page from 0 - 127.

try that to see if it works.
 
#83
I currently work with the LM3S8962 microcontroller for my research group, so I may be able to help if you have questions. However, my work has been with adding support to the operating system (such as I2C recently), the firmware I work on already has the hard stuff done for me (the NVIC seemed really goofy to work with at first haha). Our group bought a really cheap LM3S9B92 eval board but unfortunately OpenOCD is not working for me for it.
 
Last edited:

DirtyLude

Well-Known Member
#84
I have a couple LM3S811 on my Digikey order sheet, but all the transceivers I want are currently out of stock, so I'm holding the order until they get something in. I just plan to play with them a bit. My initial optimism is a little worn on these things. 128k and 256k parts are pretty close to ARM7 prices on Digikey.
 

AtomSoft

Well-Known Member
#85
There are 128 Pixels on the screen but split in half

CS1 (side LEFT)
CS2 (side RIGHT)

Those lines are active low. If i set both low then i am writing to both at 1 time. There is no way to set it to write to 0 - 127 pixels. Its 0-63(left) then 0-63(right) which is what my code does.

The image above shows 8 Characters on left and right. Each character is 8x8 Pixels. Now if there are 8 on the left 8x8CHAR * 8 times = 64 Pixels for 8 chars. Since there are eight on each side and a huge gap in the middle im thinking its a proteus issue.
 

AtomSoft

Well-Known Member
#86
hey guys i just noticed with uVision when you create a project it makes a startup.s file. As default this enables the PLL which in turn amps the 10mhz crystal into 40MHz. Maybe im moving too fast through code. The LCD can go about 300kHz.

So the delays should be more like:
Code:
void Delay_uS(unsigned long time){
	unsigned long x,y;
	for(x=0;x<time;x++){
		for(y=0;y<10;y++){
			;
		}
	}
}
void Delay_mS(unsigned long time){
	unsigned long x;
	for(x=0;x<time;x++){
		Delay_uS(1000);
	}
}
 
Thread starter #87
jason, the font looks like 5+1 font (5 columns of letters + 1 empty column). so 6*8=48, and you are short of 64-48=16 columns, which may be that gap.
 

AtomSoft

Well-Known Member
#88
lol you was close....
its 7 bytes long but the loop ends then it adds a 0x00.
It has special code for font 0x55 is supposed not print. Like if the loop encounters a 0x55 in the loop it doesn't put it on screen. I guess i was retarded back then lol... so i edit the code and not its GREAT!

Code:
void PutChar(unsigned char data){
unsigned char i,d;
	if(data >= 0x20){
		data -= 0x20;
		for(i=0;i<7;i++){
			d=Font[data][i];
			if(d == 0x55)
				GLCD_Write_Data(0x00);
			else
				GLCD_Write_Data(~d);
		}
	}
		GLCD_Write_Data(0x00);		//Noir sur Blanc
}
I will edit the font to show only the 8x7 and remove the blank 0x00
 

Attachments

Last edited:

AtomSoft

Well-Known Member
#90
This GLCD Stuff is killing me lol im going to start from scratch but this time im going to learn about the LPC2106 OSC. And try my best to get timing down pack.

I know how to control pins, create ports and get input from a Pin/Port so now i need to know how the PLL and stuff fits in with that startup.s file :D
 
Last edited:

AtomSoft

Well-Known Member
#92
yeah i noticed it... i disabled all PLL stuff and doing it in CODE. Simpler to me.
Code:
void init_PLL(void)
{
	PLLCFG = 0x00000024;	//Set Multiplier and Divider of PLL to give 60MHz
	PLLCON = 0x00000001;	//Enable the PLL

	PLLFEED = 0x000000AA;	//Update PLL registers with feed sequence
	PLLFEED = 0x00000055;	

	while(!(PLLSTAT & 0x00000400));		//Test Lock bit

	PLLCON = 0x00000003;	//Connect the PLL

	PLLFEED = 0x000000AA;	//Update PLL registers with feed sequence
	PLLFEED = 0x00000055;	

	VPBDIV = 0x00000002;	//Set the VLSI peripheral bus to 30MHz
}
 

AtomSoft

Well-Known Member
#93
Small nice BLINK.C ... i made the delays they seem to work as supposed to but not 100% sure :D
Code:
#include <LPC210x.h>
#define LED 0

void SetPin(unsigned long tPin){
	IOPIN = IOPIN | (1<<tPin);
}
void ClrPin(unsigned long tPin){
	IOPIN = IOPIN & ~(1<<tPin);
}
void delayus(unsigned int time){
	unsigned int x, delay;

	for(x=0;x<time;x++){
		for(delay=0;delay<8;delay++){
			;
		}
	}
}
void delayms(unsigned int time){
	unsigned int x, delay;

	for(x=0;x<time;x++){
		for(delay=0;delay<7540;delay++){
			;
		}
	}
}
void init_PLL(void){
	PLLCFG = 0x00000024;	//Set Multiplier and Divider of PLL to give 60MHz
	PLLCON = 0x00000001;	//Enable the PLL

	PLLFEED = 0x000000AA;	//Update PLL registers with feed sequence
	PLLFEED = 0x00000055;	

	while(!(PLLSTAT & 0x00000400));		//Test Lock bit

	PLLCON = 0x00000003;	//Connect the PLL

	PLLFEED = 0x000000AA;	//Update PLL registers with feed sequence
	PLLFEED = 0x00000055;	

	VPBDIV = 0x00000002;	//Set the VLSI peripheral bus to 30MHz
}

int main(void){
	init_PLL();

	PINSEL0 = 0x00000000;
	IODIR = 0xFFFFFFFF;

	while(1){
		SetPin(LED);
		delayms(300);

		ClrPin(LED);
		delayms(300);
	}
}
 
Last edited:
#94
hi
anyone do wince on arm cortex A8/A9? i want to run wince/win8 on samsung cortex A9 s5pv310, can you give me some advise?
the board is below:
 
#98
Hi,

There are plenty of ARM cortex mcu available now days like NXP, TI, Freescale and others as well, but it also depend on your application and what you want to do with it, accordingly you can choose one.
 

Latest threads

EE World Online Articles

Loading

 
Top