SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
By Delicon
#8428
I started my project out using an LPC2106 but found out that the IO was way too slow for my application, so I switched to an LPC2148. I was able to compile and run code fine on the 2106 using the Eclipse guide by James Lynch. With the 2148 I cant tell if my code is running or not.

What I do know is that the 2148 seems to be functioning fine. Its clocked with a 14.7456MHz clock. The ISP functions correctly using the latest LPC2000 Philips software. P0.14 causes the 2148 to enter ISP and when programmed with code the 2148 doesnt go to the ISP unless I pull down P0.14. So thats good news in that the valid code word is programmed correctly. So I have come to the conclusion that its my makefile, linker scripts, or code. I am assuming that its not my startup code since that should be the same for the whole LPC2100 family.

Can someone out there help me test this theory? I need a hex file for the 214X that runs at any clock speed that just wiggles a bit or two. I just need something to show that code appears to run. Something like:
Code: Select all
	FIO1DIR = 0x00030000;

	while(1) {
		FIO1SET = 0x00030000;
		FIO1CLR = 0x00030000;
	}
Thanks so much,

Vern
By stephan2148
#8437
I am running an Olimex board with the IAR compiler. The mess of precoded functions is so vast, it is like writing windows code. If I knew how to toggle one bit or change a port value, I would help you. Your code is not defined, and any examples I have don't show how to do the most basic thing that I need. What ever happened to PORTX=0x003f etc...
Steve
By Delicon
#8438
stephan2148 wrote:I am running an Olimex board with the IAR compiler. The mess of precoded functions is so vast, it is like writing windows code. If I knew how to toggle one bit or change a port value, I would help you. Your code is not defined, and any examples I have don't show how to do the most basic thing that I need. What ever happened to PORTX=0x003f etc...
Steve
Hi Steve. I understand your frustrations. When dealing with embedded projects I try to stay away from the compilers that try to hide all the low level microcontroller stuff. Using them really makes it hard to understand how the controller works. Sure they make it easy, but a user can end up in more trouble from their lack of understanding.
What ever happened to PORTX=0x003f etc...
Steve
You can still do this with the newer LPC controllers. Use IOXPIN = 0x0000003F.

My problem is I dont know where the problem is. The hardware, the tools, or the software. I was hoping someone could help me out with a hex file they know works so I could try it on mine. Just a simple I/O wiggle described in my original post.

Vern