Quantcast
Channel: Microcontrollers, Programming and IoT
Viewing all articles
Browse latest Browse all 1271

Learning SPI: Arduino UNO as slave, PIC16F73 as master

$
0
0
Hi! This is my first try on SPI communication. As title says, I have a PIC connected to my UNO. The idea is to send numbers from the PIC to the UNO via SPI and from there on to my PC via Serial.print . The PIC is powered from the UNO.

I can't get my codes to work however and have no idea what is wrong.

Code on PIC (master):
unsigned char i = 0;

void init(void)
{
ADCON0 = 0;
ADCON1 = 0b0000111;
TRISC.B3 = 0; // SCK
TRISA.B5 = 0; // _SS
TRISC.B5 = 0; // SDO...

Learning SPI: Arduino UNO as slave, PIC16F73 as master

Viewing all articles
Browse latest Browse all 1271

Trending Articles