21 Commits

Author SHA1 Message Date
25ad1ad7df try math 2024-03-06 13:17:08 +01:00
6536dc5534 try math 2024-03-06 13:16:18 +01:00
730ac0df30 try math 2024-03-06 13:15:56 +01:00
152c9f60d4 try math 2024-03-06 13:14:43 +01:00
2f07e37b5d try math 2024-03-06 13:12:59 +01:00
d61986630c try math 2024-03-06 13:12:13 +01:00
2e19371fac try math 2024-03-06 13:08:18 +01:00
53e33bf4ff try math 2024-03-06 13:08:04 +01:00
01c645d8df try math 2024-03-06 13:07:38 +01:00
75acdd3171 try math 2024-03-06 13:04:32 +01:00
e6db62c9a5 try math 2024-03-06 13:04:14 +01:00
2ccef81175 try math 2024-03-06 13:03:49 +01:00
ad37bb2280 fix for new image 2024-03-06 12:57:37 +01:00
fd6eb582eb new image 2024-03-06 12:55:36 +01:00
8292d59cf0 doc on reset circuit 2024-03-06 10:44:31 +01:00
1e77cdaddf Merge branch 'main' of gitea.hottis.de:wn/rgb-driver-01 2024-03-06 10:39:23 +01:00
d0219a3c77 violet 2024-03-06 10:39:10 +01:00
2bef7bf2c2 Merge branch 'main' of gitea.hottis.de:wn/rgb-driver-01 2024-03-06 10:37:12 +01:00
9f50f6010b reset circuit 2024-03-06 10:36:43 +01:00
c35ec0991c dimm factor introduced 2024-03-05 17:01:53 +01:00
584e834b0d comment 2024-03-05 16:21:56 +01:00
5 changed files with 50 additions and 15 deletions

View File

@ -1,5 +1,6 @@
#include "colors.h"
#define DIMM_FACTOR 3
.section ".rodata","a"
;; color definitions according to
;; https://learn.sparkfun.com/tutorials/lilypad-protosnap-plus-activity-guide/3-custom-color-mixing
@ -9,29 +10,29 @@ colors:
off:
.byte 0x00, 0x00, 0x00, 0
blue:
.byte 0x00, 0x00, 0xff, 0
.byte 0x00>>DIMM_FACTOR, 0x00>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0
green:
.byte 0x00, 0xff, 0x00, 0
.byte 0x00>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0x00>>DIMM_FACTOR, 0
orange:
.byte 0xff, 0x80, 0x00, 0
.byte 0xff>>DIMM_FACTOR, 0x80>>DIMM_FACTOR, 0x00>>DIMM_FACTOR, 0
rose:
.byte 0xff, 0x00, 0x80, 0
.byte 0xff>>DIMM_FACTOR, 0x00>>DIMM_FACTOR, 0x80>>DIMM_FACTOR, 0
magenta:
.byte 0xff, 0x00, 0xff, 0
.byte 0xff>>DIMM_FACTOR, 0x00>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0
violet:
.byte 0x80, 0x00, 0xff, 0
.byte 0x80>>DIMM_FACTOR, 0x00>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0
azure:
.byte 0x00, 0x80, 0xff, 0
.byte 0x00>>DIMM_FACTOR, 0x80>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0
cyan:
.byte 0x00, 0xff, 0xff, 0
.byte 0x00>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0
springgreen:
.byte 0x00, 0xff, 0x80, 0
.byte 0x00>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0x80>>DIMM_FACTOR, 0
chartreuse:
.byte 0x80, 0xff, 0x00, 0
.byte 0x80>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0x00>>DIMM_FACTOR, 0
yellow:
.byte 0xff, 0xff, 0x00, 0
.byte 0xff>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0x00>>DIMM_FACTOR, 0
white:
.byte 0xff, 0xff, 0xff, 0
.byte 0xff>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0xff>>DIMM_FACTOR, 0
red:
.byte 0xff, 0x00, 0x00, 0
.byte 0xff>>DIMM_FACTOR, 0x00>>DIMM_FACTOR, 0x00>>DIMM_FACTOR, 0

BIN
docs/reset-circuit.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 KiB

BIN
docs/reset-signal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

4
main.S
View File

@ -53,7 +53,7 @@
.section ".data"
screendata:
.rept 60
.rept 60 ;; number of leds in hardward
.byte 0
.endr
screendataend:
@ -164,7 +164,7 @@ forwardscreen:
mov.w data_forward_pointer, r10
mov.b #_off, @r10
inc.w r10
mov.b #_green, @r10
mov.b #_violet, @r10
cmp.w r10, r8
jnz forwardscreen_done
mov.w #screendata, r10

View File

@ -61,3 +61,37 @@ During of loading data into six LEDs: 297us
| 100 | | 5.9ms |
| 200 | | 11.8ms |
## 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)
#### Reference voltage (green):
```math
U_ref = 3.3V \frac{22k\Omega}{22k\Omega + 10k\Omega} = 2.2V
```
#### Trigger voltage (purple):
```math
U_trigg = 3.3V \frac{330k\Omega}{330k\Omega + 82k\Omega} = 2.64V
```
#### RC constant:
```math
\tau = 82k\Omega \cdot 100nF = 8.2ms
```