| ??? 11/10/07 09:30 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#146829 - simple LPC925 system Responding to: ???'s previous message |
Tim Brown said:
1)As a beginner should I use these parts or buy something different? I used a P89LPC925 and a MAX232. Read below... Tim Brown said:
2)Is a crystal necessary? From what I can tell most chips have an internal clock and the crystal is for timing and serial port communication. Nope. The internal oscillator works fine. Tim Brown said:
3)Can anyone provide some basic schematics for the proper way to wire these. Preferably, with a same 20 pin controller. I've been reading datasheets but I'm not always sure what the pins are since they'll have multiple functions. Here is a schematic/picture of my breadboarded LPC925 / MAX232 / 7805 system: http://www.ece.ubc.ca/~jesusc/LPC925C.pdf http://www.ece.ubc.ca/~jesusc/Circ925.jpg Tim Brown said:
4)What are some other hardware that is needed? I know of a power regulator, but what is needed for this. For my breadboarded system I used: a DB9 female connector, 78L05 or 7805 voltage regulator, 3 x 0.1 uF capacitors, 4 x 10 uF capacitors, two pushbuttons, one 1N4007 diode, and one LED or two additional 1N4007 diodes (the forward bias voltage drop is used to lower the 7805 voltage from 5V to 3.1V or 3.6V to power the LPC925). The ADC in the LPC925 works better if the two 1N4007 are used. (I know, a 3.3V regulator would work even better!) You'll also need a computer with a serial port. If you are buying/using an USB to serial adapter, make sure it has the FTDI chip/driver. From my experience USB to serial adapters with the FTDI chip are the most reliable. The C compiler I use is SDCC (duh!). The assembler I use is Metalink assembler (google it, it is a free download). I wrote my own simple Window$ IDE (use at your own risk) which can be downloaded from: http://www.ece.ubc.ca/~jesusc/crosside_setup.exe which includes a flasher for the LPC925. If you are using Linux or any other IDE/editor, you can use this flasher I also wrote (again, use at your own risk): http://www.ece.ubc.ca/~jesusc/flash925.c Compile it using GCC on Linux or Cygwin: gcc flash925.c -o flash925.exe I tested the above program in Debian Linux Sarge and Cygwin... but I guess (hope!) it also works in other Linuxes. To put the LPC925 in ISP mode, press and hold the pushbutton attached to pin 12, press and release the reset pushbutton (attached to pin 4), and then release the pushbutton attached to pin 12. Warning: Never use FlashMagic with this circuit, or you'll flash your microcontroller only once!!! The flasher(s) I wrote insert this code in the LPC925 which let you easily put the LPC925 in ISP mode:
org 1D00H
jb 90h, L1 ; If the TXD pin is one execute user code
L2: jnb 90H, L2 ; If the TXD pin is zero run the bootloader
ljmp 1F00H ; The entry point for the ISP bootloader
L1: ljmp 0 ; The entry point for the user code
end
and then it changes the boot vector to address 1D00H. Jesús |



