File tree 2 files changed +23
-0
lines changed
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 17
17
avrprog = adafruit_avrprog .AVRprog ()
18
18
avrprog .init (spi , board .D5 )
19
19
20
+ # we can generate an 6 MHz clock for driving bare chips too!
21
+ clock_pwm = pulseio .PWMOut (board .D9 , frequency = 6000000 , duty_cycle = 65536 // 2 )
22
+
20
23
# Each chip has to have a definition so the script knows how to find it
21
24
atmega328p = {'name' : "ATmega328P" }
22
25
atmega328p ['sig' ] = [0x1E , 0x95 , 0x0F ]
Original file line number Diff line number Diff line change
1
+ """
2
+ Read Signature Test - All this does is read the signature from the chip to
3
+ check connectivity!
4
+ """
5
+
6
+ import board
7
+ import busio
8
+ import pulseio
9
+ import adafruit_avrprog
10
+
11
+ spi = busio .SPI (board .SCK , board .MOSI , board .MISO )
12
+ avrprog = adafruit_avrprog .AVRprog ()
13
+ avrprog .init (spi , board .D5 )
14
+
15
+ # we can generate an 6 MHz clock for driving bare chips too!
16
+ clock_pwm = pulseio .PWMOut (board .D9 , frequency = 6000000 , duty_cycle = 65536 // 2 )
17
+
18
+ avrprog .begin ()
19
+ print ("Signature bytes: " , [hex (i ) for i in avrprog .read_signature ()])
20
+ avrprog .end ()
You can’t perform that action at this time.
0 commit comments