I had a think regarding front end sensor integration: fossasia/pslab-python#200
I have a thought of including Adafruit's drivers which uses CircuitPython-busio, since pslab-python has busio (I2C) now. Which I planned to discuss in meeting. Unfortunately i am unable to attend.
spectro = TCD1304() data = spectro.read_signal()
set_state, PWMGenerator uses the firmware function sqr4. This function outputs a PWM signal on every SQ-pin, including pins which should be constant high or constant low. It is therefore necessary to reset pins which should not have PWM signals on them after calling the firmware function.
For testing SPI transfer, I planned to connect MISO and MOSI
(SDO -> SDI). Simple but, has some cons: can't test write and read independently, and can't test SMP bit of SPI config (main problem).
Then second plan, use logic analyser for MOSI and PWM generator for MISO. By this we can test write and read separately and can test SMP bit of SPI config. But testing SMP bit need precision PWM wave generation.
For testing, we need a PWM wave with the same frequency as SPI and 50% phase shifted from SPI. So that if we read, we get 0 (when SMP=0; Input data is sampled at the middle of data output time) and 0xFF (when SMP=1; Input data is sampled at the end of data output time).
SCK: ___|```|___|```|___|`` PWM: `|___|```|___|```|___| SMP=0: ___|_______|_______|__ (Input Sample) SMP=1: _______|_______|______ (Input Sample)
Glasgow is a tool for exploring digital interfaces, aimed at embedded developers, reverse engineers, digital archivists, electronics hobbyists, and everyone else who wants to communicate to a wide selection of digital devices with high reliability and minimum hassle. It can be attached to most devices without additional active or passive components, and includes extensive protection from unexpected conditions and operator error.