Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Solutions to exercise 13: Seven Segment display and KeypadThe Seven Segment Display and the TM1637 controller chipExercise 1: The driver and its test program | ||||||||
Changed: | ||||||||
< < | Writing a bit banging driver is a non-trivial task. Not only must you correctly set the signal levels but you also must get the timing of the signals right. All this must be done by programming GPIO pins. But how can you make sure the signals have the shape they should have as described in the chip's data sheet? The best way of course is to observe the signals on an oscilloscope. If you don't have a scope at hand then you can try to log the signals and their timing To files. | |||||||
> > | Writing a bit banging driver is a non-trivial task. Not only must you correctly set the signal levels but you also must get the timing of the signals right. All this must be done by programming GPIO pins. But how can you make sure the signals have the shape they should have as described in the chip's data sheet? The best way of course is to observe the signals on an oscilloscope. If you don't have a scope at hand then you can try to log the signals and their timing to files. | |||||||
This is the strategy I opted for: Each time I set a signal to either the dio or the clk pin I write this event into a log file. as long as I wait, I copy the current signals levels onto the log file. | ||||||||
Line: 19 to 19 | ||||||||
![]() | ||||||||
Changed: | ||||||||
< < | The driver tm1637.py has the following methods: | |||||||
> > | The tricky bit about such a driver is that you are "walking in the dark" until you see the first segment light up. Once you have got this far you are usually not too far away from success.
The driver tm1637.py has the following methods: | |||||||
| ||||||||
Changed: | ||||||||
< < | The above three methods are foreseen for internal use.
| |||||||
> > | The above three methods are foreseen for internal use while the following calls are intended for use by applications:
| |||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
In addition to the driver itself, which must be uploaded to the ESP32 before use ampy put tm1637.py /lib/tm1637.py |