Author Topic: pic24f spi1buf undeclared  (Read 1541 times)

0 Members and 1 Guest are viewing this topic.

Offline gauravmpTopic starter

  • Regular Contributor
  • *
  • Posts: 77
  • Country: us
pic24f spi1buf undeclared
« on: August 25, 2016, 01:47:29 pm »
Hi,

I just got back to my pic microcontrollers and I got this new device: pic24fj128gb202. I'm using it for a basic read from a "thermocouple reader" through SPI and displaying it on UART. I tried the same code on a pic24fj64ga002 and it works. However, I wanted to migrate to this new device. I've made all the necessary changes to the configuration bits and the different registers for the new device for spi, uart, analog/digital and so on.

But, when I build it, it says SPI1BUF undeclared which has really stumped me because SPI1BUF exists on the datasheet and I've checked to see that I've selected the right device on MPLabX. I'm using the XC16 C compiler version 1.26. Does anyone have any idea what the problem might be?

Thanks!
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: pic24f spi1buf undeclared
« Reply #1 on: August 25, 2016, 01:49:05 pm »
Open the device header file and see what you can find?
 
The following users thanked this post: gauravmp

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2300
  • Country: gb
Re: pic24f spi1buf undeclared
« Reply #2 on: August 25, 2016, 01:54:46 pm »

Isn't it:

SPI1BUFL
SPI1BUFH
 
The following users thanked this post: gauravmp

Offline gauravmpTopic starter

  • Regular Contributor
  • *
  • Posts: 77
  • Country: us
Re: pic24f spi1buf undeclared
« Reply #3 on: August 25, 2016, 01:57:15 pm »
Ahhhhh!!!!!!!!!!!!!! There's the problem!!!!!!!!!!!! Thank you so much!!!!!!!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf