20 lines
850 B
Plaintext
20 lines
850 B
Plaintext
Commands:
|
|
- Compile .asm to .hex: `naken430asm -o <name>.hex <name>.asm`
|
|
- Flash to microprocessor: `mspdebug rf2500`, then enter `prog <name>.hex`
|
|
|
|
Note to self:
|
|
- microprocessor should be grounded; do NOT connect voltage to VCC!
|
|
- remember to connect +5V to 7-segment display
|
|
- connect all wires to microprocessor, then flash, then exit mspdebug!!
|
|
program will not run without exiting
|
|
- max value of a word is 2^16 = 65536, so halving blink rate by double dec count of 40000
|
|
means adding another decrementation of 40000 in another register
|
|
|
|
off -> red -> green -> both -> off
|
|
00 -> 01 -> 10 -> 11 -> 00
|
|
0x00 -> 0x01 -> 0x40 -> 0x41 -> 0x00
|
|
0000 0000 -> 0000 0001 -> 0100 0000 -> 0100 0001 -> 0000 0000
|
|
xor 0x01 xor 0x41 xor 0x01 xor 0x41
|
|
xor 0x40 xor 0x40 xor 0x40
|
|
|