This commit is contained in:
Sergey Yarkov 2023-10-12 22:36:06 +03:00
parent fdfd05ac15
commit 8a84df0cfa
No known key found for this signature in database
GPG Key ID: E91CE1FABC619B6F
30 changed files with 2556 additions and 291 deletions

View File

@ -14,5 +14,13 @@
.EQU LED_DIR = DDRB
.EQU LED_PORT = PORTB
.EQU MAX_CYCLES = 2
.EQU TIMER1_PRESCALE_MASK = 0x0f ; 16384
.EQU MAX_CYCLES = 10
.EQU TIMER1_PRESCALE_MASK = (1<<CS13) | (1<<CS11) | (1<<CS10) ; 1024
; Seconds
.EQU DELAY_STATE_0 = 30
.EQU DELAY_STATE_1 = 2
.EQU DELAY_STATE_2 = 2
.EQU DELAY_STATE_3 = 30
.EQU DELAY_STATE_4 = 2

View File

@ -1,22 +0,0 @@
:020000020000FC
:0200000003C03B
:1000060075C00FE50DBF0FE107BB002708BB00E871
:1000160000BF00270FBD0DE30EBD00E409BF05B705
:10002600006105BF552400E000936000789420919C
:100036006000203069F4C49AC09A69D0353009F05E
:100046004EC0C09801E0009360005AD0E89447C0C3
:10005600213089F45CD0323029F0C09A5CD0C09847
:100066005AD03DC0C198052D0230D4F502E0009368
:10007600600046D034C02230A9F4C19A48D032304C
:1000860009F02DC0C1980EF006C0C398539400E045
:100096000093600024C0C498C39A03E000936000F4
:1000A6002FD01DC0233059F4C29A31D0353009F013
:1000B60016C0C29804E00093600022D010C024301D
:1000C60071F425D0323029F0C29A25D0C29823D0B7
:1000D60006C0C29802E000936000689411D0A7CFD2
:1000E60005B7006205BF002708BB88950F931F93CD
:1000F6000FB7339511271FBD0FBF1F910F9118958D
:1001060000B7007F00BF00270FBD302F089500B74E
:100116000F6000BF08950F931F931FEF0FEF0A950F
:0C012600F1F71A95D9F71F910F91089579
:00000001FF

View File

@ -1,50 +0,0 @@
<ASSEMBLER_INFO>
<VERSION>2.2.7</VERSION>
<DEVICE>"ATtiny45"</DEVICE>
<WORKING_DIR>Z:\home\sergeyyarkov\Documents\Projects\Firmwares\AVR\attiny45v_traffic-lights.X</WORKING_DIR>
<INCLUDE_PATH>
<DIR>/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/avrasm/inc</DIR>
<DIR></DIR>
</INCLUDE_PATH>
<SOURCE_FILE>firmware.asm</SOURCE_FILE>
<INCLUDED_FILES>
<FILE>/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/avrasm/inc\tn45def.inc</FILE>
<FILE>definitions.asm</FILE>
</INCLUDED_FILES>
<OBJECT_FILES>
<FILE>dist/default/production/attiny45v_traffic-lights.X.production.obj</FILE>
</OBJECT_FILES>
<HEX_FILES>
<FILE>dist/default/production/attiny45v_traffic-lights.X.production.hex</FILE>
</HEX_FILES>
<OUTPUT_FILES>
<FILE>dist/default/production/attiny45v_traffic-lights.X.production.map</FILE>
<FILE>dist/default/production/attiny45v_traffic-lights.X.production.lss</FILE>
</OUTPUT_FILES>
<LABELS>
<STATE><FILE>firmware.asm</FILE><LINE>23</LINE></STATE>
<RESET_vect><FILE>firmware.asm</FILE><LINE>33</LINE></RESET_vect>
<TIMER1_COMPA><FILE>firmware.asm</FILE><LINE>173</LINE></TIMER1_COMPA>
<INIT><FILE>firmware.asm</FILE><LINE>37</LINE></INIT>
<LOOP><FILE>firmware.asm</FILE><LINE>68</LINE></LOOP>
<_S0><FILE>firmware.asm</FILE><LINE>70</LINE></_S0>
<_S1><FILE>firmware.asm</FILE><LINE>87</LINE></_S1>
<TIMER_ON><FILE>firmware.asm</FILE><LINE>194</LINE></TIMER_ON>
<_S0_TIMER><FILE>firmware.asm</FILE><LINE>79</LINE></_S0_TIMER>
<END><FILE>firmware.asm</FILE><LINE>162</LINE></END>
<TIMER_OFF><FILE>firmware.asm</FILE><LINE>185</LINE></TIMER_OFF>
<_S2><FILE>firmware.asm</FILE><LINE>108</LINE></_S2>
<_S1_TIMER><FILE>firmware.asm</FILE><LINE>98</LINE></_S1_TIMER>
<DELAY><FILE>firmware.asm</FILE><LINE>200</LINE></DELAY>
<MCU_SLEEP><FILE>firmware.asm</FILE><LINE>165</LINE></MCU_SLEEP>
<_S3><FILE>firmware.asm</FILE><LINE>132</LINE></_S3>
<_S2_TIMER><FILE>firmware.asm</FILE><LINE>116</LINE></_S2_TIMER>
<_CYCLE_DONE><FILE>firmware.asm</FILE><LINE>120</LINE></_CYCLE_DONE>
<_S2_NEXT><FILE>firmware.asm</FILE><LINE>125</LINE></_S2_NEXT>
<_S4><FILE>firmware.asm</FILE><LINE>146</LINE></_S4>
<_S3_TIMER><FILE>firmware.asm</FILE><LINE>140</LINE></_S3_TIMER>
<_S4_TIMER><FILE>firmware.asm</FILE><LINE>157</LINE></_S4_TIMER>
<_l1><FILE>firmware.asm</FILE><LINE>204</LINE></_l1>
<_l0><FILE>firmware.asm</FILE><LINE>206</LINE></_l0>
</LABELS>
</ASSEMBLER_INFO>

View File

@ -0,0 +1,22 @@
:020000020000FC
:0200000003C03B
:1000060073C00FE50DBF0FE107BB002708BB002734
:100016000FBD0DE70EBD00E409BF05B7006105BFC2
:10002600552400E000936000789420916000203011
:1000360069F4C49AC09A69D03E3109F04EC0C0989E
:1000460001E0009360005AD0E89447C0213089F45B
:100056005CD0323029F0C09A5CD0C0985AD03DC0EE
:10006600C198052D0A30D4F502E00093600046D011
:1000760034C02230A9F4C19A48D0323009F02DC0DC
:10008600C1980EF006C0C398539400E00093600038
:1000960024C0C498C39A03E0009360002FD01DC00B
:1000A600233059F4C29A31D03E3109F016C0C298B5
:1000B60004E00093600022D010C0243071F425D0F3
:1000C600323029F0C29A25D0C29823D006C0C298F1
:1000D60002E000936000689411D0A7CF05B70062D4
:1000E60005BF002708BB88950F931F930FB733955D
:1000F60011271FBD0FBF1F910F91189500B7047FE1
:1001060000BF00270FBD302F089500B70B6000BF5A
:1001160008950F931F931CE306E90A95F1F71A95C4
:08012600D9F71F910F91089514
:00000001FF

View File

@ -1,5 +1,5 @@
AVRASM ver. 2.2.7 firmware.asm Fri Oct 06 21:12:23 2023
AVRASM ver. 2.2.7 firmware.asm Thu Oct 12 22:35:12 2023
[builtin](2): Including file '/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/avrasm/inc\tn45def.inc'
firmware.asm(13): Including file 'definitions.asm'
@ -697,8 +697,8 @@ firmware.asm(13): Including file 'definitions.asm'
; Source code: https://github.com/sergeyyarkov/attiny24a_traffic-lights
; Device: ATtiny45v
; Assembler: AVR macro assembler 2.2.7
; Clock frequency: 1MHz
; Fuses: lfuse: , hfuse: , efuse: , lock:
; Clock frequency: 128 kHz
; Fuses: lfuse: 0xd4, hfuse: 0xdf, efuse: 0xff, lock: 0xff
;
; Written by Sergey Yarkov 06.10.2023
@ -721,13 +721,21 @@ firmware.asm(13): Including file 'definitions.asm'
.EQU LED_DIR = DDRB
.EQU LED_PORT = PORTB
.EQU MAX_CYCLES = 2
.EQU MAX_CYCLES = 10
.EQU TIMER1_PRESCALE_MASK = (1<<CS13) | (1<<CS11) | (1<<CS10) ; 1024
; Seconds
.EQU DELAY_STATE_0 = 30
.EQU DELAY_STATE_1 = 2
.EQU DELAY_STATE_2 = 2
.EQU DELAY_STATE_3 = 30
.EQU DELAY_STATE_4 = 2
.MACRO stsi
ldi t1, @1
sts @0, t1
.ENDMACRO
.DSEG
.ORG SRAM_START
@ -739,195 +747,194 @@ firmware.asm(13): Including file 'definitions.asm'
000000 c003 rjmp RESET_vect
.ORG 0x03
000003 c075 rjmp TIMER1_COMPA
000003 c073 rjmp TIMER1_COMPA
RESET_vect:
000004 e50f ldi t1, LOW(RAMEND)
000005 bf0d out SPL, t1
INIT:
; Setup ports
000006 e10f ldi t1, (1<<ROAD_R_LED) | (1<<ROAD_Y_LED) | (1<<ROAD_G_LED) | (1<<WALK_R_LED) | (1<<WALK_G_LED)
000007 bb07 out DDRB, t1
000008 2700 clr t1
000009 bb08 out LED_PORT, t1
; Freq(t) = 1MHz / 16384 = 61.03515625 Hz
; Tick(t) = 1 / Freq(t) = 1 / 61.03515625 = 16384 uS (0.016384 sec)
; SumTicks = 1 sec / 0.016384 sec = 61
; Setup 8-bit timer-1 in CTC mode
00000a e800 ldi t1, (1<<CTC1)
00000b bf00 out TCCR1, t1 ; setup timer
00000c 2700 clr t1 ; clear timer counter register
00000d bd0f out TCNT1, t1
00000e e30d ldi t1, 61
00000f bd0e out OCR1A, t1
000010 e400 ldi t1, (1<<OCIE1A) ; enable output compare A interrupt
000011 bf09 out TIMSK, t1
; ====== Setup 8-bit Timer Counter 1 =======================================
; Freq(t) = 128kHz / 1024 = 125Hz
; Tick(t) = 1 / Freq(t) = 1 / 125Hz = uS (0.008 sec)
; Ticks per second = 1 sec / 0.008 sec = 125
; ==========================================================================
00000a 2700 clr t1 ; clear timer counter register
00000b bd0f out TCNT1, t1
00000c e70d ldi t1, 125 ; <== 1 second
00000d bd0e out OCR1A, t1
00000e e400 ldi t1, (1<<OCIE1A) ; enable output compare A interrupt
00000f bf09 out TIMSK, t1
; Setup sleep mode in power-down
000012 b705 in t1, MCUCR
000013 6100 ori t1, (1<<SM1)
000014 bf05 out MCUCR, t1
000010 b705 in t1, MCUCR
000011 6100 ori t1, (1<<SM1)
000012 bf05 out MCUCR, t1
000015 2455 clr cycles
000016 e000
000017 9300 0060 stsi STATE, 0
; Setup global variables
000013 2455 clr cycles
000014 e000
000015 9300 0060 stsi STATE, 0
000019 9478 sei
000017 9478 sei
LOOP:
00001a 9120 0060 lds t3, STATE
000018 9120 0060 lds t3, STATE
_S0: ; State 0
00001c 3020 cpi t3, 0
00001d f469 brne _S1
00001e 9ac4 sbi LED_PORT, WALK_G_LED
00001f 9ac0 sbi LED_PORT, ROAD_R_LED
000020 d069 rcall TIMER_ON
000021 3035 cpi timer_secs, 5
000022 f009 breq _S0_TIMER
000023 c04e rjmp END
00001a 3020 cpi t3, 0
00001b f469 brne _S1
00001c 9ac4 sbi LED_PORT, WALK_G_LED
00001d 9ac0 sbi LED_PORT, ROAD_R_LED
00001e d069 rcall TIMER_ON
00001f 313e cpi timer_secs, DELAY_STATE_0
000020 f009 breq _S0_TIMER
000021 c04e rjmp END
_S0_TIMER:
000024 98c0 cbi LED_PORT, ROAD_R_LED
000025 e001
000026 9300 0060 stsi STATE, 1
000028 d05a rcall TIMER_OFF
000029 94e8 clt
00002a c047 rjmp END
000022 98c0 cbi LED_PORT, ROAD_R_LED
000023 e001
000024 9300 0060 stsi STATE, 1
000026 d05a rcall TIMER_OFF
000027 94e8 clt
000028 c047 rjmp END
_S1: ; State 1
00002b 3021 cpi t3, 1
00002c f489 brne _S2
00002d d05c rcall TIMER_ON
00002e 3032 cpi timer_secs, 2
00002f f029 breq _S1_TIMER
000030 9ac0 sbi LED_PORT, ROAD_R_LED
000031 d05c rcall DELAY
000032 98c0 cbi LED_PORT, ROAD_R_LED
000033 d05a rcall DELAY
000034 c03d rjmp END
000029 3021 cpi t3, 1
00002a f489 brne _S2
00002b d05c rcall TIMER_ON
00002c 3032 cpi timer_secs, DELAY_STATE_1
00002d f029 breq _S1_TIMER
00002e 9ac0 sbi LED_PORT, ROAD_R_LED
00002f d05c rcall DELAY
000030 98c0 cbi LED_PORT, ROAD_R_LED
000031 d05a rcall DELAY
000032 c03d rjmp END
_S1_TIMER:
000035 98c1 cbi LED_PORT, ROAD_Y_LED
000036 2d05 mov t1, cycles
000037 3002 cpi t1, MAX_CYCLES
000038 f5d4 brge MCU_SLEEP
000039 e002
00003a 9300 0060 stsi STATE, 2
00003c d046 rcall TIMER_OFF
00003d c034 rjmp END
000033 98c1 cbi LED_PORT, ROAD_Y_LED
000034 2d05 mov t1, cycles
000035 300a cpi t1, MAX_CYCLES
000036 f5d4 brge MCU_SLEEP
000037 e002
000038 9300 0060 stsi STATE, 2
00003a d046 rcall TIMER_OFF
00003b c034 rjmp END
_S2: ; State 2
00003e 3022 cpi t3, 2
00003f f4a9 brne _S3
000040 9ac1 sbi LED_PORT, ROAD_Y_LED
000041 d048 rcall TIMER_ON
000042 3032 cpi timer_secs, 2
000043 f009 breq _S2_TIMER
000044 c02d rjmp END
00003c 3022 cpi t3, 2
00003d f4a9 brne _S3
00003e 9ac1 sbi LED_PORT, ROAD_Y_LED
00003f d048 rcall TIMER_ON
000040 3032 cpi timer_secs, DELAY_STATE_2
000041 f009 breq _S2_TIMER
000042 c02d rjmp END
_S2_TIMER:
000045 98c1 cbi LED_PORT, ROAD_Y_LED
000046 f00e brts _CYCLE_DONE
000047 c006 rjmp _S2_NEXT
000043 98c1 cbi LED_PORT, ROAD_Y_LED
000044 f00e brts _CYCLE_DONE
000045 c006 rjmp _S2_NEXT
_CYCLE_DONE:
000048 98c3 cbi LED_PORT, WALK_R_LED
000049 9453 inc cycles
00004a e000
00004b 9300 0060 stsi STATE, 0
00004d c024 rjmp END
000046 98c3 cbi LED_PORT, WALK_R_LED
000047 9453 inc cycles
000048 e000
000049 9300 0060 stsi STATE, 0
00004b c024 rjmp END
_S2_NEXT:
00004e 98c4 cbi LED_PORT, WALK_G_LED
00004f 9ac3 sbi LED_PORT, WALK_R_LED
000050 e003
000051 9300 0060 stsi STATE, 3
000053 d02f rcall TIMER_OFF
000054 c01d rjmp END
00004c 98c4 cbi LED_PORT, WALK_G_LED
00004d 9ac3 sbi LED_PORT, WALK_R_LED
00004e e003
00004f 9300 0060 stsi STATE, 3
000051 d02f rcall TIMER_OFF
000052 c01d rjmp END
_S3: ; State 3
000055 3023 cpi t3, 3
000056 f459 brne _S4
000057 9ac2 sbi LED_PORT, ROAD_G_LED
000058 d031 rcall TIMER_ON
000059 3035 cpi timer_secs, 5
00005a f009 breq _S3_TIMER
00005b c016 rjmp END
000053 3023 cpi t3, 3
000054 f459 brne _S4
000055 9ac2 sbi LED_PORT, ROAD_G_LED
000056 d031 rcall TIMER_ON
000057 313e cpi timer_secs, DELAY_STATE_3
000058 f009 breq _S3_TIMER
000059 c016 rjmp END
_S3_TIMER:
00005c 98c2 cbi LED_PORT, ROAD_G_LED
00005d e004
00005e 9300 0060 stsi STATE, 4
000060 d022 rcall TIMER_OFF
000061 c010 rjmp END
00005a 98c2 cbi LED_PORT, ROAD_G_LED
00005b e004
00005c 9300 0060 stsi STATE, 4
00005e d022 rcall TIMER_OFF
00005f c010 rjmp END
_S4: ; State 4
000062 3024 cpi t3, 4
000063 f471 brne END
000064 d025 rcall TIMER_ON
000065 3032 cpi timer_secs, 2
000066 f029 breq _S4_TIMER
000067 9ac2 sbi LED_PORT, ROAD_G_LED
000068 d025 rcall DELAY
000069 98c2 cbi LED_PORT, ROAD_G_LED
00006a d023 rcall DELAY
00006b c006 rjmp END
000060 3024 cpi t3, 4
000061 f471 brne END
000062 d025 rcall TIMER_ON
000063 3032 cpi timer_secs, 2
000064 f029 breq _S4_TIMER
000065 9ac2 sbi LED_PORT, ROAD_G_LED
000066 d025 rcall DELAY
000067 98c2 cbi LED_PORT, ROAD_G_LED
000068 d023 rcall DELAY
000069 c006 rjmp END
_S4_TIMER:
00006c 98c2 cbi LED_PORT, ROAD_G_LED
00006d e002
00006e 9300 0060 stsi STATE, 2
000070 9468 set
000071 d011 rcall TIMER_OFF
00006a 98c2 cbi LED_PORT, ROAD_G_LED
00006b e002
00006c 9300 0060 stsi STATE, DELAY_STATE_4
00006e 9468 set
00006f d011 rcall TIMER_OFF
END:
000072 cfa7 rjmp LOOP
000070 cfa7 rjmp LOOP
MCU_SLEEP:
000073 b705 in t1, MCUCR
000074 6200 ori t1, (1<<SE)
000075 bf05 out MCUCR, t1
000076 2700 clr t1
000077 bb08 out LED_PORT, t1
000078 9588 sleep
000071 b705 in t1, MCUCR
000072 6200 ori t1, (1<<SE)
000073 bf05 out MCUCR, t1
000074 2700 clr t1
000075 bb08 out LED_PORT, t1
000076 9588 sleep
TIMER1_COMPA: ; Increment timer seconds register
000079 930f push t1
00007a 931f push t2
00007b b70f in t1, SREG
00007c 9533 inc timer_secs
00007d 2711 clr t2
00007e bd1f out TCNT1, t2
00007f bf0f out SREG, t1
000080 911f pop t2
000081 910f pop t1
000082 9518 reti
000077 930f push t1
000078 931f push t2
000079 b70f in t1, SREG
00007a 9533 inc timer_secs
00007b 2711 clr t2
00007c bd1f out TCNT1, t2
00007d bf0f out SREG, t1
00007e 911f pop t2
00007f 910f pop t1
000080 9518 reti
TIMER_OFF:
000083 b700 in t1, TCCR1
000084 7f00 andi t1, ~(TIMER1_PRESCALE_MASK)
000085 bf00 out TCCR1, t1
000086 2700 clr t1
000087 bd0f out TCNT1, t1
000088 2f30 mov timer_secs, t1
000089 9508 ret
000081 b700 in t1, TCCR1
000082 7f04 andi t1, ~(TIMER1_PRESCALE_MASK)
000083 bf00 out TCCR1, t1
000084 2700 clr t1
000085 bd0f out TCNT1, t1
000086 2f30 mov timer_secs, t1
000087 9508 ret
TIMER_ON:
00008a b700 in t1, TCCR1
00008b 600f ori t1, TIMER1_PRESCALE_MASK
00008c bf00 out TCCR1, t1
00008d 9508 ret
000088 b700 in t1, TCCR1
000089 600b ori t1, TIMER1_PRESCALE_MASK
00008a bf00 out TCCR1, t1
00008b 9508 ret
DELAY:
00008e 930f push t1
00008f 931f push t2
000090 ef1f ldi t2, 0xff
00008c 930f push t1
00008d 931f push t2
00008e e31c ldi t2, 60
_l1:
000091 ef0f ldi t1, 0xff
00008f e906 ldi t1, 150
_l0:
000092 950a dec t1
000093 f7f1 brne _l0
000094 951a dec t2
000095 f7d9 brne _l1
000096 911f pop t2
000097 910f pop t1
000090 950a dec t1
000091 f7f1 brne _l0
000092 951a dec t2
000093 f7d9 brne _l1
000094 911f pop t2
000095 910f pop t1
RESOURCE USE INFORMATION
@ -947,7 +954,7 @@ counted separately from r26..r31 here.
"ATtiny45" register use summary:
x : 0 y : 0 z : 0 r0 : 0 r1 : 0 r2 : 0 r3 : 0 r4 : 0
r5 : 3 r6 : 0 r7 : 0 r8 : 0 r9 : 0 r10: 0 r11: 0 r12: 0
r13: 0 r14: 0 r15: 0 r16: 55 r17: 8 r18: 6 r19: 7 r20: 0
r13: 0 r14: 0 r15: 0 r16: 53 r17: 8 r18: 6 r19: 7 r20: 0
r21: 0 r22: 0 r23: 0 r24: 0 r25: 0 r26: 0 r27: 0 r28: 0
r29: 0 r30: 0 r31: 0
Registers used: 5 out of 35 (14.3%)
@ -962,9 +969,9 @@ brvs : 0 bset : 0 bst : 0 cbi : 9 cbr : 0 clc : 0
clh : 0 cli : 0 cln : 0 clr : 6 cls : 0 clt : 1
clv : 0 clz : 0 com : 0 cp : 0 cpc : 0 cpi : 11
cpse : 0 dec : 2 eor : 0 icall : 0 ijmp : 0 in : 5
inc : 2 ld : 0 ldd : 0 ldi : 14 lds : 1 lpm : 0
inc : 2 ld : 0 ldd : 0 ldi : 13 lds : 1 lpm : 0
lsl : 0 lsr : 0 mov : 2 movw : 0 neg : 0 nop : 0
or : 0 ori : 3 out : 15 pop : 4 push : 4 rcall : 14
or : 0 ori : 3 out : 14 pop : 4 push : 4 rcall : 14
ret : 3 reti : 1 rjmp : 14 rol : 0 ror : 0 sbc : 0
sbci : 0 sbi : 7 sbic : 0 sbis : 0 sbiw : 0 sbr : 0
sbrc : 0 sbrs : 0 sec : 0 seh : 0 sei : 1 sen : 0
@ -976,7 +983,7 @@ Instructions used: 28 out of 105 (26.7%)
"ATtiny45" memory use summary [bytes]:
Segment Begin End Code Data Used Size Use%
---------------------------------------------------------------
[.cseg] 0x000000 0x000132 302 0 302 4096 7.4%
[.cseg] 0x000000 0x00012e 298 0 298 4096 7.3%
[.dseg] 0x000060 0x000061 0 1 1 256 0.4%
[.eseg] 0x000000 0x000000 0 0 0 256 0.0%

View File

@ -1,5 +1,5 @@
AVRASM ver. 2.2.7 firmware.asm Fri Oct 06 21:12:23 2023
AVRASM ver. 2.2.7 firmware.asm Thu Oct 12 22:35:12 2023
EQU SIGNATURE_000 0000001e
@ -451,29 +451,34 @@ EQU WALK_R_LED 00000003
EQU WALK_G_LED 00000004
EQU LED_DIR 00000017
EQU LED_PORT 00000018
EQU MAX_CYCLES 00000002
EQU TIMER1_PRESCALE_MASK 0000000f
EQU MAX_CYCLES 0000000a
EQU TIMER1_PRESCALE_MASK 0000000b
EQU DELAY_STATE_0 0000001e
EQU DELAY_STATE_1 00000002
EQU DELAY_STATE_2 00000002
EQU DELAY_STATE_3 0000001e
EQU DELAY_STATE_4 00000002
DSEG STATE 00000060
CSEG RESET_vect 00000004
CSEG TIMER1_COMPA 00000079
CSEG TIMER1_COMPA 00000077
CSEG INIT 00000006
CSEG LOOP 0000001a
CSEG _S0 0000001c
CSEG _S1 0000002b
CSEG TIMER_ON 0000008a
CSEG _S0_TIMER 00000024
CSEG END 00000072
CSEG TIMER_OFF 00000083
CSEG _S2 0000003e
CSEG _S1_TIMER 00000035
CSEG DELAY 0000008e
CSEG MCU_SLEEP 00000073
CSEG _S3 00000055
CSEG _S2_TIMER 00000045
CSEG _CYCLE_DONE 00000048
CSEG _S2_NEXT 0000004e
CSEG _S4 00000062
CSEG _S3_TIMER 0000005c
CSEG _S4_TIMER 0000006c
CSEG _l1 00000091
CSEG _l0 00000092
CSEG LOOP 00000018
CSEG _S0 0000001a
CSEG _S1 00000029
CSEG TIMER_ON 00000088
CSEG _S0_TIMER 00000022
CSEG END 00000070
CSEG TIMER_OFF 00000081
CSEG _S2 0000003c
CSEG _S1_TIMER 00000033
CSEG DELAY 0000008c
CSEG MCU_SLEEP 00000071
CSEG _S3 00000053
CSEG _S2_TIMER 00000043
CSEG _CYCLE_DONE 00000046
CSEG _S2_NEXT 0000004c
CSEG _S4 00000060
CSEG _S3_TIMER 0000005a
CSEG _S4_TIMER 0000006a
CSEG _l1 0000008f
CSEG _l0 00000090

Binary file not shown.

View File

@ -0,0 +1,50 @@
<ASSEMBLER_INFO>
<VERSION>2.2.7</VERSION>
<DEVICE>"ATtiny45"</DEVICE>
<WORKING_DIR>Z:\home\sergeyyarkov\Documents\Projects\Firmwares\AVR\attiny45v_traffic-lights\firmware</WORKING_DIR>
<INCLUDE_PATH>
<DIR>/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/avrasm/inc</DIR>
<DIR></DIR>
</INCLUDE_PATH>
<SOURCE_FILE>firmware.asm</SOURCE_FILE>
<INCLUDED_FILES>
<FILE>/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/avrasm/inc\tn45def.inc</FILE>
<FILE>definitions.asm</FILE>
</INCLUDED_FILES>
<OBJECT_FILES>
<FILE>dist/default/production/firmware.production.obj</FILE>
</OBJECT_FILES>
<HEX_FILES>
<FILE>dist/default/production/firmware.production.hex</FILE>
</HEX_FILES>
<OUTPUT_FILES>
<FILE>dist/default/production/firmware.production.map</FILE>
<FILE>dist/default/production/firmware.production.lss</FILE>
</OUTPUT_FILES>
<LABELS>
<STATE><FILE>firmware.asm</FILE><LINE>23</LINE></STATE>
<RESET_vect><FILE>firmware.asm</FILE><LINE>33</LINE></RESET_vect>
<TIMER1_COMPA><FILE>firmware.asm</FILE><LINE>172</LINE></TIMER1_COMPA>
<INIT><FILE>firmware.asm</FILE><LINE>37</LINE></INIT>
<LOOP><FILE>firmware.asm</FILE><LINE>67</LINE></LOOP>
<_S0><FILE>firmware.asm</FILE><LINE>69</LINE></_S0>
<_S1><FILE>firmware.asm</FILE><LINE>86</LINE></_S1>
<TIMER_ON><FILE>firmware.asm</FILE><LINE>193</LINE></TIMER_ON>
<_S0_TIMER><FILE>firmware.asm</FILE><LINE>78</LINE></_S0_TIMER>
<END><FILE>firmware.asm</FILE><LINE>161</LINE></END>
<TIMER_OFF><FILE>firmware.asm</FILE><LINE>184</LINE></TIMER_OFF>
<_S2><FILE>firmware.asm</FILE><LINE>107</LINE></_S2>
<_S1_TIMER><FILE>firmware.asm</FILE><LINE>97</LINE></_S1_TIMER>
<DELAY><FILE>firmware.asm</FILE><LINE>199</LINE></DELAY>
<MCU_SLEEP><FILE>firmware.asm</FILE><LINE>164</LINE></MCU_SLEEP>
<_S3><FILE>firmware.asm</FILE><LINE>131</LINE></_S3>
<_S2_TIMER><FILE>firmware.asm</FILE><LINE>115</LINE></_S2_TIMER>
<_CYCLE_DONE><FILE>firmware.asm</FILE><LINE>119</LINE></_CYCLE_DONE>
<_S2_NEXT><FILE>firmware.asm</FILE><LINE>124</LINE></_S2_NEXT>
<_S4><FILE>firmware.asm</FILE><LINE>145</LINE></_S4>
<_S3_TIMER><FILE>firmware.asm</FILE><LINE>139</LINE></_S3_TIMER>
<_S4_TIMER><FILE>firmware.asm</FILE><LINE>156</LINE></_S4_TIMER>
<_l1><FILE>firmware.asm</FILE><LINE>203</LINE></_l1>
<_l0><FILE>firmware.asm</FILE><LINE>205</LINE></_l0>
</LABELS>
</ASSEMBLER_INFO>

View File

@ -3,8 +3,8 @@
; Source code: https://github.com/sergeyyarkov/attiny24a_traffic-lights
; Device: ATtiny45v
; Assembler: AVR macro assembler 2.2.7
; Clock frequency: 1MHz
; Fuses: lfuse: , hfuse: , efuse: , lock:
; Clock frequency: 128 kHz
; Fuses: lfuse: 0xd4, hfuse: 0xdf, efuse: 0xff, lock: 0xff
;
; Written by Sergey Yarkov 06.10.2023
@ -16,7 +16,7 @@
ldi t1, @1
sts @0, t1
.ENDMACRO
.DSEG
.ORG SRAM_START
@ -33,24 +33,22 @@ STATE: .BYTE 1
RESET_vect:
ldi t1, LOW(RAMEND)
out SPL, t1
INIT:
; Setup ports
ldi t1, (1<<ROAD_R_LED) | (1<<ROAD_Y_LED) | (1<<ROAD_G_LED) | (1<<WALK_R_LED) | (1<<WALK_G_LED)
out DDRB, t1
clr t1
out LED_PORT, t1
; Freq(t) = 1MHz / 16384 = 61.03515625 Hz
; Tick(t) = 1 / Freq(t) = 1 / 61.03515625 = 16384 uS (0.016384 sec)
; SumTicks = 1 sec / 0.016384 sec = 61
; Setup 8-bit timer-1 in CTC mode
ldi t1, (1<<CTC1)
out TCCR1, t1 ; setup timer
; ====== Setup 8-bit Timer Counter 1 =======================================
; Freq(t) = 128kHz / 1024 = 125Hz
; Tick(t) = 1 / Freq(t) = 1 / 125Hz = uS (0.008 sec)
; Ticks per second = 1 sec / 0.008 sec = 125
; ==========================================================================
clr t1 ; clear timer counter register
out TCNT1, t1
ldi t1, 61
ldi t1, 125 ; <== 1 second
out OCR1A, t1
ldi t1, (1<<OCIE1A) ; enable output compare A interrupt
out TIMSK, t1
@ -60,6 +58,7 @@ INIT:
ori t1, (1<<SM1)
out MCUCR, t1
; Setup global variables
clr cycles
stsi STATE, 0
@ -73,7 +72,7 @@ _S0: ; State 0
sbi LED_PORT, WALK_G_LED
sbi LED_PORT, ROAD_R_LED
rcall TIMER_ON
cpi timer_secs, 5
cpi timer_secs, DELAY_STATE_0
breq _S0_TIMER
rjmp END
_S0_TIMER:
@ -88,7 +87,7 @@ _S1: ; State 1
cpi t3, 1
brne _S2
rcall TIMER_ON
cpi timer_secs, 2
cpi timer_secs, DELAY_STATE_1
breq _S1_TIMER
sbi LED_PORT, ROAD_R_LED
rcall DELAY
@ -110,7 +109,7 @@ _S2: ; State 2
brne _S3
sbi LED_PORT, ROAD_Y_LED
rcall TIMER_ON
cpi timer_secs, 2
cpi timer_secs, DELAY_STATE_2
breq _S2_TIMER
rjmp END
_S2_TIMER:
@ -134,7 +133,7 @@ _S3: ; State 3
brne _S4
sbi LED_PORT, ROAD_G_LED
rcall TIMER_ON
cpi timer_secs, 5
cpi timer_secs, DELAY_STATE_3
breq _S3_TIMER
rjmp END
_S3_TIMER:
@ -156,7 +155,7 @@ _S4: ; State 4
rjmp END
_S4_TIMER:
cbi LED_PORT, ROAD_G_LED
stsi STATE, 2
stsi STATE, DELAY_STATE_4
set
rcall TIMER_OFF
END:
@ -200,9 +199,9 @@ TIMER_ON:
DELAY:
push t1
push t2
ldi t2, 0xff
ldi t2, 60
_l1:
ldi t1, 0xff
ldi t1, 150
_l0:
dec t1
brne _l0
@ -210,4 +209,4 @@ _l0:
brne _l1
pop t2
pop t1
ret
ret

23
firmware/firmware.hex Normal file
View File

@ -0,0 +1,23 @@
:020000020000FC
:0200000003C03B
:1000060078C00FE50DBF4DE453EC88D00FE107BB78
:10001600002708BB00E800BF00270FBD0DE30EBD9B
:1000260000E409BF05B7006105BF552400E0009351
:100036006000789420916000203069F4C49AC09AD8
:1000460069D0353009F04EC0C09801E000936000D9
:100056005AD0E89447C0213089F45CD0323029F078
:10006600C09A60D0C0985ED03DC0C198052D0230C0
:10007600D4F502E00093600046D034C02230A9F4E3
:10008600C19A48D0323009F02DC0C1980EF006C092
:10009600C398539400E00093600024C0C498C39AA8
:1000A60003E0009360002FD01DC0233059F4C29A9C
:1000B60031D0353009F016C0C29804E000936000D4
:1000C60022D010C0243071F425D0323029F0C29AE3
:1000D60029D0C29827D006C0C29802E000936000DB
:1000E600689411D0A7CF05B7006205BF002708BBEB
:1000F60088950F931F930FB7339511271FBD0FBF19
:100106001F910F91189500B7007F00BF00270FBD04
:10011600302F089500B70F6000BF0895415050403A
:10012600E8F708950F931F931FEF0FEF0A95F1F766
:0A0136001A95D9F71F910F91089553
:00000001FF

View File

@ -30,12 +30,12 @@ ifeq ($(TYPE_IMAGE), DEBUG_RUN)
IMAGE_TYPE=debug
OUTPUT_SUFFIX=obj
DEBUGGABLE_SUFFIX=obj
FINAL_IMAGE=${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
FINAL_IMAGE=${DISTDIR}/firmware.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
else
IMAGE_TYPE=production
OUTPUT_SUFFIX=obj
DEBUGGABLE_SUFFIX=obj
FINAL_IMAGE=${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
FINAL_IMAGE=${DISTDIR}/firmware.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
endif
ifeq ($(COMPARE_BUILD), true)
@ -91,7 +91,7 @@ FIXDEPS=fixDeps
ifneq ($(INFORMATION_MESSAGE), )
@echo $(INFORMATION_MESSAGE)
endif
${MAKE} -f nbproject/Makefile-default.mk ${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
${MAKE} -f nbproject/Makefile-default.mk ${DISTDIR}/firmware.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
# ------------------------------------------------------------------------------------
# Rules for buildStep: assemble
@ -100,22 +100,22 @@ ${OBJECTDIR}/firmware.obj: firmware.asm nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${DISTDIR}
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/firmware.obj
${MP_AS} -fI -W+ie ${PACK_ASSEMBLER_OPTIONS} -d ${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -m ${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.map -S ${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.tmp firmware.asm
${MP_AS} -fI -W+ie ${PACK_ASSEMBLER_OPTIONS} -d ${DISTDIR}/firmware.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -m ${DISTDIR}/firmware.${IMAGE_TYPE}.map -S ${DISTDIR}/firmware.${IMAGE_TYPE}.tmp firmware.asm
else
${OBJECTDIR}/firmware.obj: firmware.asm nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${DISTDIR}
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/firmware.obj
${MP_AS} -fI -W+ie ${PACK_ASSEMBLER_OPTIONS} -d ${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -S ${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.tmp -o ${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.hex -m ${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.map -l ${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.lss firmware.asm
${MP_AS} -fI -W+ie ${PACK_ASSEMBLER_OPTIONS} -d ${DISTDIR}/firmware.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -S ${DISTDIR}/firmware.${IMAGE_TYPE}.tmp -o ${DISTDIR}/firmware.${IMAGE_TYPE}.hex -m ${DISTDIR}/firmware.${IMAGE_TYPE}.map -l ${DISTDIR}/firmware.${IMAGE_TYPE}.lss firmware.asm
endif
# ------------------------------------------------------------------------------------
# Rules for buildStep: link
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
${DISTDIR}/firmware.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
else
${DISTDIR}/attiny45v_traffic-lights.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
${DISTDIR}/firmware.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
endif

View File

@ -1,14 +1,14 @@
#
#Fri Oct 06 20:28:16 MSK 2023
#Thu Oct 12 21:37:08 MSK 2023
default.languagetoolchain.version=2.2.7
default.Pack.dfplocation=/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151
conf.ids=default
default.languagetoolchain.dir=/usr/bin
host.id=2l3s-yrgx-1d
configurations-xml=24ce39071a0ec358d27bffbdceac8894
configurations-xml=2bcc85e3f1ff194b9a4ca910d6cc76f6
default.com-microchip-mplab-nbide-toolchain-avrasm-AVRASMLanguageToolchain.md5=0e94da8ed93e9650ffef50929833a79f
default.com-microchip-mplab-mdbcore-snap-SnapToolImpl.md5=eaa336cefb7fc46db8b50b7b2b6e54ca
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=6e02ca5e9f5042ffd365b42ab82d3a9b
user-defined-mime-resolver-xml=none
proj.dir=/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_traffic-lights.X
proj.dir=/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_traffic-lights/firmware
host.platform=linux

View File

@ -24,7 +24,7 @@ CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
# Project Name
PROJECTNAME=attiny45v_traffic-lights.X
PROJECTNAME=firmware
# Active Configuration
DEFAULTCONF=default

View File

@ -6,5 +6,5 @@
CND_BASEDIR=`pwd`
# default configuration
CND_ARTIFACT_DIR_default=dist/default/production
CND_ARTIFACT_NAME_default=attiny45v_traffic-lights.X.production.obj
CND_ARTIFACT_PATH_default=dist/default/production/attiny45v_traffic-lights.X.production.obj
CND_ARTIFACT_NAME_default=firmware.production.obj
CND_ARTIFACT_PATH_default=dist/default/production/firmware.production.obj

View File

@ -85,7 +85,7 @@
value="Press to select which tool pack to use"/>
<property key="communication.interface" value="isp"/>
<property key="communication.interface.jtag" value="2wire"/>
<property key="communication.speed" value="0.125"/>
<property key="communication.speed" value="0.012"/>
<property key="debugoptions.debug-startup" value="Use system settings"/>
<property key="debugoptions.reset-behaviour" value="Use system settings"/>
<property key="debugoptions.simultaneous.debug" value="false"/>
@ -123,6 +123,10 @@
value="Press to select which tool pack to use"/>
</Tool>
<item path="definitions.asm" ex="true" overriding="false">
<AVR-ASM>
</AVR-ASM>
<AVR-Global>
</AVR-Global>
</item>
<snap>
<property key="AutoSelectMemRanges" value="auto"/>
@ -134,7 +138,7 @@
value="Press to select which tool pack to use"/>
<property key="communication.interface" value="isp"/>
<property key="communication.interface.jtag" value="2wire"/>
<property key="communication.speed" value="0.125"/>
<property key="communication.speed" value="0.012"/>
<property key="debugoptions.debug-startup" value="Use system settings"/>
<property key="debugoptions.reset-behaviour" value="Use system settings"/>
<property key="debugoptions.simultaneous.debug" value="false"/>

View File

@ -2,9 +2,6 @@
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_traffic-lights.X/definitions.asm</file>
<file>file:/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_traffic-lights.X/firmware.asm</file>
</group>
<group/>
</open-files>
</project-private>

View File

@ -0,0 +1,42 @@
(kicad_symbol_lib (version 20220914) (generator kicad_symbol_editor)
(symbol "NCP1402" (in_bom yes) (on_board yes)
(property "Reference" "U" (at -0.254 7.874 0)
(effects (font (size 1.27 1.27)))
)
(property "Value" "NCP1402" (at -0.254 5.588 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "Package_TO_SOT_SMD:SOT-23-5" (at -1.27 -6.35 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "https://www.onsemi.com/pdf/datasheet/ncp1402-d.pdf" (at 0 -9.525 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "NCP1402_1_1"
(rectangle (start -7.62 4.318) (end 6.985 -3.81)
(stroke (width 0) (type default))
(fill (type background))
)
(pin input line (at -10.16 2.54 0) (length 2.54)
(name "CE" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin power_out line (at -10.16 0 0) (length 2.54)
(name "OUT" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin no_connect line (at -10.16 -2.54 0) (length 2.54)
(name "NC" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin power_out line (at 9.525 -2.54 180) (length 2.54)
(name "GND" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
(pin input line (at 9.525 2.54 180) (length 2.54)
(name "LX" (effects (font (size 1.27 1.27))))
(number "5" (effects (font (size 1.27 1.27))))
)
)
)
)

View File

@ -0,0 +1,2 @@
(kicad_pcb (version 20221018) (generator pcbnew)
)

View File

@ -0,0 +1,77 @@
{
"board": {
"active_layer": 0,
"active_layer_preset": "",
"auto_track_width": true,
"hidden_netclasses": [],
"hidden_nets": [],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"images": 0.6,
"pads": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.6
},
"selection_filter": {
"dimensions": true,
"footprints": true,
"graphics": true,
"keepouts": true,
"lockedItems": false,
"otherItems": true,
"pads": true,
"text": true,
"tracks": true,
"vias": true,
"zones": true
},
"visible_items": [
0,
1,
2,
3,
4,
5,
8,
9,
10,
11,
12,
13,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
32,
33,
34,
35,
36,
39,
40
],
"visible_layers": "fffffff_ffffffff",
"zone_display_mode": 0
},
"meta": {
"filename": "hardware.kicad_prl",
"version": 3
},
"project": {
"files": []
}
}

View File

@ -0,0 +1,332 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"board_outline_line_width": 0.1,
"copper_line_width": 0.2,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"other_line_width": 0.15,
"silk_line_width": 0.15,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.15
},
"diff_pair_dimensions": [],
"drc_exclusions": [],
"rules": {
"min_copper_edge_clearance": 0.0,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0
},
"track_widths": [],
"via_dimensions": []
},
"layer_presets": [],
"viewports": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"conflicting_netclasses": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"lib_symbol_issues": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"similar_labels": "warning",
"simulation_model_issue": "ignore",
"unannotated": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "hardware.kicad_pro",
"version": 1
},
"net_settings": {
"classes": [
{
"bus_width": 12,
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.25,
"via_diameter": 0.8,
"via_drill": 0.4,
"wire_width": 6
}
],
"meta": {
"version": 3
},
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"specctra_dsn": "",
"step": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"page_layout_descr_file": "",
"plot_directory": "",
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"e29099bd-458d-4e4d-9f27-b577fc57ce4c",
""
]
],
"text_variables": {}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
(sym_lib_table
(version 7)
(lib (name "ncp1402")(type "KiCad")(uri "${KIPRJMOD}/ncp1402.kicad_sym")(options "")(descr ""))
(lib (name "components")(type "KiCad")(uri "${KIPRJMOD}/components.kicad_sym")(options "")(descr ""))
)