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.

[SOLVED] Problem with SSPBUF ; PIC18F8722 - Not Transmitting or Recieving - HELP!!!!

Status
Not open for further replies.

Praveen1991

Newbie level 3
Newbie level 3
Joined
Jan 31, 2013
Messages
3
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Trivandrum
www.facebook.com
Activity points
1,306
Hi,

First of all, I am using PIC18F8722 for testing my program i wrote in ASSEMBLY for logging RAW data onto SDHC card ( 8GB Sandisk Class 4) using ( of Course ) SPI protocol. Been through every harrowing moment of not using C, and finally wrote the ASSEMBLY program to perfection ( of course with some help), and i simulated my program on PROTEUS and it worked like a charm, now when I burn the same program onto the PIC18DEM EXPLORER ( 18F8722) board, the processor loops in this part and never comes out,

SPI_IO movwf SSP1BUF
btfss SSP1CON1, WCOL
BRA S2
bcf SSP1CON1, WCOL
BRA SPI_IO
S2 btfss SSP1STAT, BF
BRA S2
movf SSP1BUF, w
return

It stays in this loop, like forever. But if the same board is burned with program written in C, it works just fine but not in assembly, Any idea where i would be going wrong, PLEASE HELP!!!!!!!

PS : This the first time i am using PIC series uC,
PPS : the Code is attached
PPPS : Even tried to implement the C libraries in Assembly but to no avail...
 

Attachments

  • Board_SDCARD_R_W.txt
    3.7 KB · Views: 77

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top