Utter Newbie, very keen, equally stuck (LPC2148, Crossworks)

Hi All,

By luck/bad-luck, my first encounter with the world of electronics has been a need to make an LPC2148 do some things. I’m part of a project whose electronics chap has suddenly been taken ill, but stoically insists we carry on without him. Unfortunately, he’s not about to give me a crash course in digital electronics.

So, I’ve read up in the last two days a few starter books in digital electronics, I know what registers are, I understand bit -masks and bitwise operations in C, I am beginning to have a rough idea of what a hex number is in dec if you show it to me. I know what an ADC is, I think I2C is pretty cool. It’s been a learning curve!

However, getting an LPC2148 to fire up is a bit of a chunk that I’m finding difficult to break down into smaller bites. Once it’s working, I think I’m happy enough with the C to, say, blink an LED, send serial to the PC, or whatever. It’s the bit that you do to set everything up that confuses me. I’m sure if I read the ARM manual I’d be fine, but I’m in a bit of a rush with this project. I really like digital electronics now and will continue to persue it, but until then I was wondering if anyone knew of a good tutorial for crossworks that was spoon-feedy to the effect of ‘to make an LPC2148 make an LED blink, first let’s start with the config… [setting PLLs, telling me if I want to do this flash reading acceleration thing, stuff like that] … then you need to set up porta.pinx to be an output, like so…’

I know that’s incredibly prescriptive, and normally I too would scoff and tell the enquire they’d learn a lot more if they figured it out themselves, but I’m really in a push and would be hugely appreciative if anyone could help me, as a true ignorant, up the creek without a paddle!

A project file which is quite well commented for the above would also help. Basically, imagine you had to tell a monkey how to make this happen! As an engineering student, I speak maths, but really little electronics.

Thank you enormously in advance,

Carl

(not edmoore, though he recommended I use his account to ask any questions here).

The initialization is the worst part of any project IMO.

The link in my signature has an example project for the Olimex LPC-P2148 board but it part of the whole OS, may be it is too complicated as starting point. Anyway you could look at the initialization code and follow the path until the main() function. The example can run as-is on the Olimex board, the initialization code can be different on other boards, it is usually mainly about the I/O pins configuration.

Read Jim Lynch’s ARM tutorial. It’s set up to spoon-feed you on how to get an LPC2106 working, but the source code also has an included main, makefile, etc. for the LPC2148. It’s what I used to get started with ARMs (I also use the LPC2148), and IMHO, it’s very well written and easy to follow even for n00bs.

The CrossWorks IDE does everything for you - you just have to create a project and write a few lines of C to flash an LED.

You’ll find lots of examples showing how to do more complex stuff in the Files section of the LPC2000 Yahoo group.

Leon