Releases: LabVIEWCommunityTraining/cti-firmware
v0.9.2
Oh boy it's been a bit since I've posted a build to GitHub.
Full base functionality. Includes:
- board IO mappings for error checking in LV drivers
- UART, I2C, SPI comms
- GPIO, AI, and PWM "basic" capabilities
0.9 is the last pre-release version before the WiFi functionality is finished as 0.10
PWM
Allows control of the PWM hardware on the Pi Pico. Defaults to 0% duty cycle (controllable 0-1) and 10kHz. On the Pi Pico, only even numbered GPIO are supported. (0, 2, 4, 6, 8, 10, 12, 14). Note that 16+ can also be used but share the same PWM engine as each of the first 8. If you enable PWM on 0 and 16 (or 2 and 18, 4 and 20, etc.) at the same time, changing either of them changes both. The top and divider commands are for manual setting of PWM registers, preference should be given to the duty and frequency commands.
On the Pi Pico the minimum possible frequency is ~7.45Hz all the way up to 12.5Mhz. From minimum up to ~1907Hz, 65536 levels of duty % are available (full 16bit range) and past 1907 the level count is reduced to achieve the desired frequency. At 12.5Mhz only 10 settable levels are available. Here is a table of effective bit-depths with their maximum frequency:
16: 1.907 kHz
15: 3.814 kHz
14: 7.629 kHz
13: 15.2 kHz
12: 30.5 kHz
11: 61 kHz
10: 122 kHz
... and doubling each lower bit.
Commands:
PWM:INIT <GPIO#>[,<0|1|OFF|ON>[,<0|1|OFF|ON>]] // GPIO#, Phase Correct, Enable
PWM:DUTY <GPIO#>,<0-1>
PWM:FREQuency <GPIO#>,
PWM:ENable <GPIO#>
PWM:DUTY? <GPIO#>
PWM:FREQ? <GPIO#>
PWM:TOP <GPIO#>,
PWM:DIVider <GPIO#>,
Status LED
Adds ability to control Status LED source which defaults to comms RX activity on startup. Once a user status is set automatic sources will be disabled until re-enabled. Current available sources are:
- User
- Comms
Commands:
STATus:USER <0|1|OFF|ON>
STATus:SOURce?
STATus:SOURce <COMMS|USER>
Newline cleanup
Discovered scpi-parser already adds terminating CRLF so explicit newlines were removed from command handling to cleanup the LV wrappers.
No new SCPI commands
Digital I/O & Analog In - Pi Pico USB
Initial test release for the CTI team to start playing with.
Commands:
DIGital:DIRection <GPIO#>, <IN|OUT>
DIGital:DIRection? <GPIO#>
DIGital[:OUTput]:VALue <GPIO#>, <0|1|OFF|ON>
DIGital[:OUTput]:VALue? <GPIO#>
DIGital[:INput]:VALue? <GPIO#>
DIGital[:INput]:PULL <GPIO#>, <NONE|UP|DOWN|BOTH>
DIGital[:INput]:PULL? <GPIO#>
ANAlog[:INput]:ENable <AI#>, <0|1|OFF|ON>
ANAlog[:INput]:VALue? <AI#>