Connecting the TCD1304 board to the STM32F401RE:
Or if you went with the 2nd SMD-version:
Or the version with a regulated voltage supply:
The connections depend on the firmware. If in doubt download the latest firmware from http://tcd1304.wordpress.com and follow the instructions at that site (I don't always remember to keep HAD up-to-date.)
- fM connects to PB0
- SH connects to PA1
- ICG connects to PA0
- Output connects to PC0
Ideally the TCD1304 runs on 4.0 V, but connecting V+ to the +5V pin works fine.
Connect Nucleo F401RE to Raspberry Pi:
The SPI headers on the raspberry pi are located on:
- MOSI P1-19
- MISO P1-21
- SCLK P1-23
- GND P1-25
On the nucleo board these are located on:
- MOSI on PB15
- MISO on PB14
- SCLK on PB13
- GND - there are lots to choose from
Setting up the cross-compiler on linux:
Download the gcc-arm-none-eabi
Unzip to a directory, and add the compiler to path by adding this line to .bashrc:
Download the standard peripherals library (SPL) for the STM32F4.
Download the TCD1304 driver firmware for the Nucleo F401RE
Unzip to the directory the SPL unzipped to. Enter directory and type 'make'.
Upload the resulting .bin file to the nucleo board.
NB: If you haven't got a 74HC04 or other inverter between the nucleo and the TCD1304 there are a couple lines in timer_conf.c you'll want to change. Inverse the timer polarity registers.
Installing GUI on Raspberry Pi:
Download and install raspbian.
Update the system.
Run raspi-config and enable SPI.
Resize SPI buffer (by default it's too small). Append the following to the line in /boot/cmdline.txt:
Download the Otterly Raman GUI
Unzip, enter directory, and type 'make'.
Goto tcd1304.wordpress.com for better instructions.
I'm trying not to use cursewords here, but the HaD-interface is not making it easy.
For a more well-structured set of instructions goto https://tcd1304.wordpress.com