An affordable and open-source FPGA platform for the electronic control of microscope.
The number of devices available for each signal is defined in the top file of the AlchitryLabs project. Note that the number of analog signals cannot be increased (technically only to 9 if incorporating the dedicated VP/VN signal).
First, change the constants at the beginning of the top file (line 62):
// number of signals
const NUM_LASERS = 8;
const NUM_TTL = 5; // we added one TTL signal here
const NUM_PWM = 5;
const NUM_SERVOS = 7;
const NUM_ANALOG = 8;
Then, add the corresponding signals to the definition of the top file module (lines 34). Here is an example of the new TTL signal:
output ttl3,
output ttl4, // new ttl signal
output servo0,
output servo1,
Ignore the error for now.
Finally, the new signal should be linked with a module output. In our example (line 226):
ttl3 = ttl.q[3];
ttl4 = ttl.q[4]; // new ttl signal receives the output of the ttl module
Finally, the new signal of our example (ttl5) needs to be added to the user constraint file:
pin ttl3 A8;
pin ttl4 C40; // new ttl
Here, we chose a free 3.3 V pin (see pins mapping).
Then compile and update the firmware (see building MicroFPGA configuration for a walkthrough).
Note that if you are using Micro-Manager, the Java or Python libraries, you will have to modify the number of signals in the user code as well: