You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I am confused how doppler-FPGA-firmware/doppler_simple_io/doppler_simple_io.h ends up on my computer. Maybe that happens when I add the Doppler in the Arduino board manager?
FPGA configuration to make all the FPGA pins PWM outputs:
#include <ICEClass.h>
PWM_ICEClass ice40pwm;
void setup() { // put your setup code here, to run once:
ice40pwm.upload(); // Upload BitStream Firmware to FPGA -> see variant.h
delay(100);
ice40pwm.initSPI(); // start SPI runtime Link to FPGA
}
void loop() { // put your main code here, to run repeatedly:
// code that allows the user to then choose an FPGA pin and set a PWM duty cycle for it
// maybe something like
ice40pwm.pinMode(F0, OUTPUT)
ice40pwm.analogWrite(F0, 255)
}
}
Maybe the doppler library could come with a set of ICEClass subclasses that would load bitstreams for different functionality. This would let users comfortable with Arduino sketches experiment before diving into Verilog:
I think it would be nice to make this code more flexible so that it is not hard coded to a single bitstream:
https://github.com/dadamachines/ArduinoCore-samd/blob/master/variants/doppler/ICEClass.h
It would be useful to have different classes for different bitstreams so that the desired functionality can be chosen in the Arduino sketch without have to modify header files in the library.
https://github.com/dadamachines/ArduinoCore-samd/blob/master/variants/doppler/ICEClass.h#L12
which seems to reference:
https://github.com/dadamachines/doppler-FPGA-firmware/blob/master/doppler_simple_io/doppler_simple_io.h
The text was updated successfully, but these errors were encountered: