MicroFPGA

Logo

An affordable and open-source FPGA platform for the electronic control of microscope.

View My GitHub Profile

Changing pins

Lasers, TTLs, Servos and PWMs

To change the pin associated with a specific signal, modify the configuration file user.acf in the source folder of Au/Au+/Cu firmware folder in the main MicroFPGA repository. Note that the pins of the analog signals are defined differently and cannot be moved anywhere.

For instance, in the case of the Au/Au+ board, pin A27 is associated with TTL0:

pin ttl0 A27;

A look at the pins distribution on the Br board tells us that the pin D43 is free, and we can therefore map it to TTL0:

pin ttl0 D43;

You can alternatively swap it with a pin you may not be using (example: PWM9).

Once you modified the configuration file, you need to build the FPGA configuration.

Analog inputs

Analog input pins are fixed. On the other hand, their MicroFPGA labels can be swapped. They are a consequence of the addresses order in the analog module (line 39):

// pins (Br): B3/B2, B6/B5, B27/B28, B21/B20, B48/B49, B45/B46, B18/B17, B24/B23
const ADDR = {31,30,29,28,23,22,21,20};

There, the channel 0 has the address 20, which means that it is on pin B24/23. If you want the channel 0 in place of the channel 5, then swap the addresses 20 and 29:

// pins (Br): B3/B2, B6/B5, B27/B28, B21/B20, B48/B49, B45/B46, B18/B17, B24/B23
const ADDR = {31,30,20,28,23,22,21,29};

Finally, compile and update the firmware on the FPGA (see build the FPGA configuration for a walkthrough).

For more details on the analog channels addresses, consult the Analog input mapping note.