User Tools

Site Tools


guides:lpc810_design

LPC810 based node

Windows?

Follow these instructions for building/uploading: LPC810 based node - Windows build/upload instructions

Toolchain

git clone https://github.com/jamescoxon/LPC810.git
  • go into the src directory and run make
cd LPC810
cd src
make
  • It should compile cleanly using the gcc-arm you've installed and at the end produce something like this (details might vary)
   text	   data	    bss	    dec	    hex	filename
   3100	     21	    470	   3591	    e07	blinky.axf

Generating blinky.hex (FlashMagic, etc.)
Generating blinky.bin

Editing Code

  • To give your node an ID you'll need to go into src/ and open main.c and edit
uint8_t num_repeats = '5';
char id[] = "AH1";
char location_string[] = "51.3580,1.0208";
  • num_repeats will be the maximum number of hops the packet will make, ID is how the station will identify itself and location string will allow it to be placed on the map.
  • Save the file and then run
make

Uploading/Flashing

  • Using lpc21isp we can upload via serial, this uses the bootloader which uses a default set of pins for serial rx and tx. You'll also need to ground pin 5 to put the micro into ISP mode when it turns on.
  • As per http://vilaca.eu/lpc810/ connect up a usb-serial converter and the using lpc21isp we can upload the blinky.hex
./lpc21isp -hex -term ~/Projects/LPC810/src/blinky.hex /dev/tty.usbmodem1421 115200 14746
  • You'll need to change the paths to both your blinky.hex and usb-serial device
  • It'll now start waiting for the device on the serial port and you'll need to turn the micro on and off to get it to go into the boatloader and it should then upload the code.
  • Once uploaded you'll need to detach pin 5 (ISP mode) from ground and then turn the micro on and off again and your code will run.

PCB Guide

  • Components
    • RFM69HW
    • LPC810 Microprocessor
    • MCP1700 Voltage Regulator
    • 2x 1uF Capacitors
    • SMA connection for antenna
  • JP1 (from left to right)
    • Pin 8 (tx for uploading/flashing)
    • Pin 2 (rx for uploading/flashing)
    • Pin 5 (ISP to go into bootloader)
    • Ground
  • 3.3v header (starting closest to the regulator)
    • VCC (3.3v)
    • Gnd
  • 5v header (starting closest to the regulator)
    • VCC (5v) - goes to the regulator
    • Gnd

  • To upload to the onboard LPC810 on the PCB you need to ground Pin 5 (they are next to each other on the JP1 header). Connect up Pin 8 and Pin 2 to your rx and tx on your serial port.
  • Once uploaded remember to detach Pin 5 from Ground to ensure when you reboot the micro it starts running the code.
  • The current codebase once running uses different pins for its onboard serial port (Pin 8 and Pin 5) as Pin 2 gets used for comms with the radio. To get serial output you'll need to change your connections.

Setting up as a Gateway

  • Connect your serial ports Tx and Rx to JP1 - 1 and JP1 - 3 (the first and third pin on the JP1 Header)
  • Gnd and VCC to either 5v or 3.3v depending on your source
  • Setup your serial port to 9600baud
  • Currently on boot it'll output 'Done' and then any data it receives.
  • Run a script to upload data to UKHASnet (eg. Python Example for a Pi UART)
  • Issues:
    • May need to switch Rx and Tx around
    • Check the serial port speed
    • Ensure that headers and pins are making good contact

Future Plans

  • PCB redesign
    • FTDI header
    • Switch pins so that Serial pins are the same as programming pins (much easier to do with a PCB)
    • Break out SPI pins to allow other SPI devices to be added
guides/lpc810_design.txt · Last modified: 2020/06/27 23:02 (external edit)