Another Getting Started Thread

The hobby market is well served by the 8-bit offerings from Atmel and MCHP. Since you like/want to play with open source stuff, take a look at one of these. For about $100, you get development board with an extensive range of peripherals that will run everything up to Linux and Windows CE.

http://www.thaieasyelec.com/images/colu … ni2440.jpg

CPU: 400 MHz Samsung S3C2440A ARM920T

RAM: 64 MB SDRAM, 32 bit Bus

Flash: 256 MB NAND Flash and 2 MB NOR Flash with BIOS

EEPROM: 1024 Byte (I2C)

Ext. Memory: SD-Card socket

Serial Ports: 1x DB9 connector (RS232), total: 3x serial port connectors

USB: 1x USB-A Host 1.1, 1x USB-B Device 1.1

Audio Output: 3.5 mm stereo jack

Audio Input: Connector + Condenser microphone

Ethernet: RJ-45 10/100M (DM9000)

RTC: Real Time Clock with battery

Beeper: PWM buzzer

Dimension: 100 x 100 mm

Camera: 20 pin Camera interface (2.0 mm)

320x240 TFT LCD with TouchScreen

Touch Panel: 4 wire resistive

User Inputs: 6x push buttons and 1x A/D pot

User Outputs: 4x LEDs

Expansion: 40 pin System Bus, 34 pin GPIO, 10 pin Buttons (2.0 mm)

Whoa now that’s really overkill! Probably not a good place to start though!

I’ve managed to find some tutorials on starting with the LPC1768 that seem quite comprehensive! Since that’s really important for me, I guess I’ll go for either the LPC1768 or 1769. What’s left to decide is whether to get a development board or make one myself! And of course the JTAG stuff. Here’s one of the sites:

http://msys-mv.blogspot.com/2010/10/sof … -with.html

I use the Rowley CrossWorks for ARM tool set and it has pre-built start-up files and scripts for all the common Cortex-M3 parts. This makes it easy to get a basic “hello world” type of application running on a new development board without worrying about the messy little details.

For not a lot of monetary investment, I suggest the “blue board”, which is an NXP LPC1768 board sold by Sparkfun (part number DEV-09931) for $49.

I use a Segger J-Link JTAG module to connect to the JTAG port on the board and can download code, set breakpoints, single step code, and everything else you need to do to develop applications for a Cortex-M3.

If you’re a hobbyist like I am, Rowley and Segger have great deals for non-commercial use. The non-commercial CrossWorks license is only $150 and the Segger J-Link EDU is only $60.

Crappinni:
What’s left to decide is whether to get a development board or make one myself!

I recommend taking one step at a time and getting a development board first. If you have any teething troubles you can at least start off by assuming it is a software problem which significantly reduces the number of possible causes.

Even when you have taken the next step and made your own board it is still useful to have the development board around. You can use it as a stable reference point when you are trying to isolate a problem to either your board or the software.

I guess making my own board does complicate things. I shall purchase a board to get started then.

Thanks for all the help!

See this? http://www.seeedstudio.com/depot/bus-bl … ?cPath=174

$32, sold out within a week

Version 2 will be out soon and it will even be cheaper, wait for it to get a good deal.

These are FT2232H based JTAG debuggers, the H is important, the H means it uses USB 2.0 high speed. All of the other vendors does not even come close to it in terms of price, and even vendors less use the H variant of the FT2232.

Also this page might be of interest http://www.micro4you.com/store/dev-tool … tml?page=0

Thanks for the links! How does it compare to http://shop.ngxtechnologies.com/product … ucts_id=30 though? Since I’m looking at the Blueboard LPC1768 COMBO from NGX http://shop.ngxtechnologies.com/product … ucts_id=97, I could get them together and save a little on shipping!

Also I’ve been reading the tutorials in more detail, here’s an example line:

LPC_SC->PCONP |= ( 1 << 15 ); // power up GPIO

Although I understand the bit manipulation part, I’ve never seen syntax like “->”! If I assume they’re just register names, how does one know the correct name (both parts) to use? I’m looking right at the user manual http://ics.nxp.com/support/documents/mi … pc17xx.pdf and it doesn’t seem to say that!

Crappinni:
I’ve never seen syntax like “->”! If I assume they’re just register names, how does one know the correct name (both parts) to use? I’m looking right at the user manual http://ics.nxp.com/support/documents/mi … pc17xx.pdf and it doesn’t seem to say that!

Here the “->” indicates that PCONP is a member of the structure named LPC. A structure is a collection of related variables. In C the keyword struct is used to define a structure. In other languages they are known as “records” and the elements are called “fields”.

If you search for PCONP in the user manual you’ll find 43 different references. You should find all of these items declared in one of the files (probably a .h ‘include’ file if you are using C) included with your development system.

Thanks! So during programming I can just use the .h file as reference?

Anyway, I thought “.” is used to denote a member of a struct? As in struct.member.

Crappinni:
Thanks for the links! How does it compare to http://shop.ngxtechnologies.com/product … ucts_id=30 though? Since I’m looking at the Blueboard LPC1768 COMBO from NGX http://shop.ngxtechnologies.com/product … ucts_id=97, I could get them together and save a little on shipping!

USB “high speed” and “full speed” (the NGX one) are not the same, the FT2232H is faster, HOWEVER, in the end it might not make much of a difference. I chose to go with high speed.

The NGX one does not mention that its JTAG port is buffered. This is a big deal, a buffer protects the FT2232, and also allows for lower JTAG pin voltages (if you use a 1.8V ARM chip, you need a buffer to translate the voltage from 3.3V)

I don’t like RS-232 or DB-9 because I have a laptop and everything I own or plan on making will not use either. Personal preference.

About the struct: you are going to see a lot of structs when working with ARM.

Sometimes they represent peripheral registers inside the ARM, and they are memory mapped to their perspective locations by a header file provided by the API (provided by the vendor, NXP).

For example, if you have two SPI modules, the two structs will be identical structurally but located at different locations.

I know this is the case with AT91LIB, LPC’s equivalent appears very similar

take a look at “\Core\CM3\DeviceSupport\NXP\LPC17xx\LPC17xx.h” when you download “LPC17xx CMSIS-Compliant Standard Peripheral Firmware Driver Library” from http://ics.nxp.com/support/documents/mi … e=software

→ is used to access members of a struct that a pointer is pointing to, so LPC_SC is not a struct, but a pointer to a struct, and that pointer is a memory location set by LPC17xx.h

Thanks! I’ll take a look at the files in a bit.

I’m still confused about the JTAG adapters though. So Bus Blaster v2 uses the FT2232H, which means the USB interface will be faster than the NGX one. How does RS232 and DB9 come into the picture though? Don’t they both connect to the computer via USB and appear as a virtual serial port?

I’ll have to look around about the JTAG buffer as well (I know nothing about this). I’m so glad I came to the forums!

The FT2232 is a dual port serial port with a bunch of other MSSP/GPIO pins that can be used for JTAG, so NGX’s model decided to connect a serial port pins to a MAX232 and DB9 where as the Bus Blaster does not have the MAX232 or the DB9. Bus Blaster V2 will have a CPLD that you can reconfigure to re-route any pin on the FT2232 to any broken out pin on the board, with internal logic as well.

They will both attach via USB and appear as two COM ports

Alright so that means the user can use the bus blaster v2 for other stuff whereas the NGX version is stuck with the MAX232 and DB9? Actually at this point all these don’t even affect which one I choose anymore. The Bus Blaster V2 will evidently be a better option.

Hi again! I’ve looked around and I think it makes most sense to purchase the Blueboard LPC1768-H. However, I saw that NXP listed the LPC1768 production status as “varies”!

I’m not sure how difficult it is to swap from LPC1768 to say LPC1769 or perhaps a lower end microcontroller if they decided to stop production for 1768. Please advise! Thanks!

Crappinni:
I’m not sure how difficult it is to swap from LPC1768 to say LPC1769 or perhaps a lower end microcontroller if they decided to stop production for 1768.

Check the line card for a summary of the differences between each type:

http://ics.nxp.com/literature/other/mic … e.card.pdf

e.g. if you decided to go with the BGA version of the 1768 you would be limiting your choices to 1 :frowning:

Thanks! I was wondering more along the lines of programming though. For example, if I swapped to one with less RAM, will there be any problems using the same code (other than modifying the linker).

You can only consider the LPC176x parts as the LPC175x parts only have 80 pins instead of 100.

If you want the greatest chance of being able to substitute a part then you need to select the lowest common denominator. As far as I can see from the line card that means you should start off with the part with the least memory (LPC1764) and avoid using its Ethernet, USB and CAN features.

Alright thanks! I guess I’ll still go for the LPC1768. Now searching for a JTAG adapter! Does anyone have experience with an awesome and affordable one they would like to recommend?

Crappinni:
Alright thanks! I guess I’ll still go for the LPC1768. Now searching for a JTAG adapter! Does anyone have experience with an awesome and affordable one they would like to recommend?

Are you a hobbyist or are you doing commercial work?

If you are a hobbyist, check out the Segger J-Link EDU, which is only $60.

Thanks! I’ll take a look at it. I’m a hobbyist!

There’re several others which are considerably more affordable (Bus Blaster, NGX JTAG etc). I wonder how the more expensive ones from Olimex compare to them?