tetris/rgb-driver/readme.md

98 lines
1.7 KiB
Markdown
Raw Normal View History

2024-02-27 11:54:19 +01:00
## Debugging
2024-02-27 11:42:54 +01:00
```
2024-02-23 21:20:16 +01:00
mspdebug rf2500 gdb
2024-02-27 11:42:54 +01:00
2024-02-23 21:20:16 +01:00
msp430-gdb -x firmware.gdb
2024-02-27 11:42:54 +01:00
```
2024-02-23 21:20:16 +01:00
Attention: the gdb in the TI toolchain package is broken, use the one from Debian
2024-02-27 11:54:19 +01:00
## Signals Working Cycler
2024-02-27 11:58:02 +01:00
These signals are related to code under tag `cycler_works_include_output_stage`.
2024-02-27 11:54:19 +01:00
First octets:
![](./docs/cycler_working_first_octets.png)
Last octets:
![](./docs/cycler_working_last_octets.png)
2024-02-27 12:09:39 +01:00
Schematics and legend for signals:
![](./docs/schematics.jpeg)
2024-02-27 19:02:02 +01:00
## Timing
2024-02-27 19:03:57 +01:00
Complete cycle: 2.48us
2024-02-27 19:02:02 +01:00
![](./docs/pulse_complete.png)
2024-02-27 19:03:57 +01:00
Short pulse: 550ns
2024-02-27 19:02:02 +01:00
![](./docs/pulse_short.png)
2024-02-27 19:03:57 +01:00
Long pulse: 1.18us
2024-02-27 19:02:02 +01:00
![](./docs/pulse_long.png)
2024-02-27 20:39:27 +01:00
2024-02-27 20:53:13 +01:00
## Load Time
2024-02-27 20:39:27 +01:00
During of loading data into five LEDs: 297us
![](./docs/five_leds.png)
2024-02-27 20:53:13 +01:00
During of loading data into six LEDs: 297us
![](./docs/six_leds.png)
| # of LEDs | Load Time measured | calculated |
| --------- | ------------------ | ---------- |
| 5 | 297us | |
| 6 | 354us | 356.4us |
| 10 | | 594us |
| 100 | | 5.9ms |
| 200 | | 11.8ms |
2024-02-27 20:39:27 +01:00
2024-03-06 10:44:31 +01:00
## Reset Circuitry
It appears that the output voltage of the power supply raises that slow, that the MCU
will not handle the reset correctly.
The following circuitry should generate a valid reset signal far enough from the raise
of the supply voltage:
![](./docs/reset-circuit.jpeg)
The circuit generates the following signals:
![](./docs/reset-signal.png)
2024-03-06 13:17:08 +01:00
#### Reference voltage (green):
2024-03-06 13:12:13 +01:00
```math
2024-03-06 13:17:08 +01:00
U_ref = 3.3V \frac{22k\Omega}{22k\Omega + 10k\Omega} = 2.2V
2024-03-06 13:15:56 +01:00
```
2024-03-06 13:16:18 +01:00
2024-03-06 13:12:59 +01:00
2024-03-06 13:17:08 +01:00
#### Trigger voltage (purple):
2024-03-06 13:12:13 +01:00
```math
2024-03-06 13:17:08 +01:00
U_trigg = 3.3V \frac{330k\Omega}{330k\Omega + 82k\Omega} = 2.64V
2024-03-06 13:15:56 +01:00
```
2024-03-06 13:16:18 +01:00
2024-03-06 13:12:59 +01:00
2024-03-06 13:17:08 +01:00
#### RC constant:
2024-03-06 13:12:13 +01:00
2024-03-06 13:04:32 +01:00
```math
2024-03-06 13:14:43 +01:00
\tau = 82k\Omega \cdot 100nF = 8.2ms
2024-03-06 13:15:56 +01:00
```