[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself

Search:


View post   

>> No.2501057 [View]
File: 148 KB, 983x1317, 2022-11-12--01:07:53.png [View same] [iqdb] [saucenao] [google]
2501057

I want to program an ATtiny13a using an arduino (3rd party board similar to the Duemilanove, uses an ATmega168, running at 16MHz).
Pins are connected as such:

ATmega168 - ATtiny13
16 (I/O 10) - 1 (RESET)
8 (GND) - 4 (GND)
17 (I/O 11) - 5 (MOSI)
18 (I/O 12) - 6 (MISO)
19 (1/O 13) - 7 (SCK)
7 (VCC) - 8 (VCC)

This is connected to a 5V supply. I'm using pic related as the program on the Arduino. The result I'm getting is:

setup
Sending: AC
Recieved: FF
Sending: 53
Recieved: 0
Sending: 0
Recieved: 0
Sending: 0
Recieved: 0

I tried using the hardware SPI on the Arduino, which also didn't work. I attributed that to
>When writing serial data to the ATtiny13A, data is clocked on the rising edge of SCK.
>When reading data from the ATtiny13A, data is clocked on the falling edge of SCK.
from the datasheet, because AFAIK, the hardware SPI can only either both read and write on the rising edge or do both on the falling edge, which is why I'm now trying to bitbang.

The ATtiny is a new chip, so I'm should have all stock settings.

Navigation
View posts[+24][+48][+96]