-
1Step 1
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.
-
2Step 2
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
-
3Step 3
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:
export PATH=/home/user/gcc-arm-none-eabi-4_9-2015q1/bin:$PATH
Download the standard peripherals library (SPL) for the STM32F4.
Unzip.
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.
-
4Step 4
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:
spidev.bufsiz=8192
Install wiringPi.
Install libgtk-3-dev
Install gnuplot.
Download the Otterly Raman GUI
Unzip, enter directory, and type 'make'.
-
5Goto 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
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Thank you for your work Esben!
I have a problem when I try to compile a modified program. If I re-compile all the source (peripheral and the others) the USART communication doesn't work. If I compile only the main it works. Where can I find a detailed procedure to compile from the beginning the program for the NUCLEO f401RE?
Are you sure? yes | no
Hi Marco
Sorry for the late reply, for some reason HaD doesn't always notify when new messages arrive. I'm trying to keep this HaD project-page up to date, but this f#¤%ing system is driving me crazy, so you should really rather goto tcd1304.wordpress.com and use the contact form there.
Messed up communication is a sign your MCU-clocks are configured differently than how you think they are. I don't know what you mean by "compile from the beginning"? Did you follow these steps https://tcd1304.wordpress.com/environment-setup/ ?
Are you sure? yes | no
Awesome work Esben!
We successfully sent clocks to TCD1304 by Atmega16, and displayed the output on an oscilloscope. But now we want to display it on a computer and import the values as csv or other format.
I've ordered a Nucleof401re and will be following these instructions. Have you also written a program to display the data on the PC?
Are you sure? yes | no
thankyou :) and sorry for the very late reply. yes, you can use the Raman GUI. You need a raspberry pi or something similar (it should function on anything that's compatible with wiringpi.
Are you sure? yes | no
Look forward to digging into this a bit. Great work.
Are you sure? yes | no
Hi, have you considered sending the data to the Pi via USB? That would make the system far more general, since you might be able to use any computer for the data adquisition.
Are you sure? yes | no
I have transfers by USART in the pipes. That could potentially eliminate the need for the rpi, as you can connect to the nucleo's USART2 through the ST-link. I'm not sure if that's what you mean?However it's not on the top of my todo-list, so don't expect anything like that before june.
Are you sure? yes | no
I was thinking on using directly the USB port (I don't know if that is
possible) but USART is OK too. I look forward to see your
implementation. In the meantime I will try to figure out if I can do it.
Are you sure? yes | no