File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1717avrprog = adafruit_avrprog .AVRprog ()
1818avrprog .init (spi , board .D5 )
1919
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+
2023# Each chip has to have a definition so the script knows how to find it
2124atmega328p = {'name' : "ATmega328P" }
2225atmega328p ['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