Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

pic18f8720 spi problem?

Status
Not open for further replies.

ahmet2004

Member level 3
Joined
Jan 1, 2004
Messages
63
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
383
setup_spi(SPI_SLAVE|SPI_L_TO_H|SPI_CLK_DIV_4);

while(1)
{
while( !spi_data_is_in() )
{ }
Var1 = spi_read();
printf("Received : %d\n\r", Var1);
}



And Iam sending SPI data from another microcontroller.
Data is 0,1,2,3,..100 with 500ms intervals. Iam using
PIC18F8720 and CCS C V4.010. But I read
0,3,4,7,8,11,12,15,16,19,20,23,24,27,28,31... values
in 18F8720. You see that there is a characteristic
error (Always same values are disappearing). When I
use PIC18F452 there is no problem and I can see
0,1,2,3,4,5,6,7,8,9,... rigth values. What is problem
whit 18F8720.
 

Hi,

Check out your clock of RX & TX.

Send RX & TX Code then & then we identify bug.

Regards
Tectona :)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top