• AVR Freaks

Hot!SPI Slave mode interrupt or not (poll)...

Page: < 12345 > Showing page 2 of 5
Author
JustRob
Super Member
  • Total Posts : 609
  • Reward points : 0
  • Joined: 2008/09/04 12:49:27
  • Location: Hudson Massachusetts United States
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/11 18:37:12 (permalink)
0
You can see from the logic analyzer that there is a clock and should select single to the thermal controller's pic

The first thing I will try tomorrow is the ansel bits but I thought they defaulted to digital. Stay tuned…


Attached Image(s)

#21
ric
Super Member
  • Total Posts : 28324
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: SPI Slave mode interrupt or not (poll)... 2020/05/11 18:49:21 (permalink)
0
JustRob
The first thing I will try tomorrow is the ansel bits but I thought they defaulted to digital.

VERY bad assumption.
All PICs default analog capable pins to analog mode. It's always your job to switch them if needed.

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#22
JustRob
Super Member
  • Total Posts : 609
  • Reward points : 0
  • Joined: 2008/09/04 12:49:27
  • Location: Hudson Massachusetts United States
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/11 19:01:40 (permalink)
0
None of the RCx pins are analog capable so I am pessimistically hopeful
#23
ric
Super Member
  • Total Posts : 28324
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: SPI Slave mode interrupt or not (poll)... 2020/05/11 19:18:01 (permalink)
0
JustRob
None of the RCx pins are analog capable

What leads you to that conclusion?
They all look analog capable in the 18F47K42 datasheet I am looking in.

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#24
RISC
Super Member
  • Total Posts : 5776
  • Reward points : 0
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 03:42:23 (permalink)
+1 (1)
Hi,
One thing to remember : for any PIC (8/16/32 bits) all pins that are analog capable default to analog @ reset...
Be careful about the pins which can be both ADC or comparator inputs, they default to ADC then COMPARATOR...so you need to initialize 2 registers "outside" of the I/O pins before being able to use them as digital pins.
Also some digital peripherals automatically "capture" the pin for a specific usage (I2C, PWM sometimes)...  
That is why I like MCC code configurator....it helps initializing pins by taking care of all registers that it needs to in order to achieve the desired functionality.
Regards
 
#25
JustRob
Super Member
  • Total Posts : 609
  • Reward points : 0
  • Joined: 2008/09/04 12:49:27
  • Location: Hudson Massachusetts United States
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 05:39:02 (permalink)
+1 (1)
~~~~ HOT DAMN ~~~~
 
du00000001 and ric, I bow to your engineering prowess...
 
I changed the code to set the SPI RCx pins as DIGITAL.  Now my two boards are communicating seamlessly.  See logic analyzer plot...
 
Now just to set up my pid controller which after all of these hurdles should be a walk in the park.
 
Thanks guys!

Attached Image(s)

#26
du00000001
Just Some Member
  • Total Posts : 3942
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: online
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 05:46:13 (permalink)
+2 (2)
JustRob
du00000001 and ric, I bow to your engineering prowess...

 
Hi Rob,
I actually am an E/E engineer, so you shouldn't be too surprised  grin
 
Nice to hear that it is working now.
 
Side note:
if you do not intend to extend the communication between the 2 controllers, you could easily do the exchange in a single cycle: while the temperature set value is transmitted, a "current temperature" value could be received. No real need to transmit zeroes at all.
The temperature controller would simply write the temperature value - whenever re-acquired - to the SPIBUF. This value will then be transmitted during the next byte exchange. AFAIK this value would be retransmitted if not updated prior the next SPI byte exchange, which shouldn't matter.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#27
JustRob
Super Member
  • Total Posts : 609
  • Reward points : 0
  • Joined: 2008/09/04 12:49:27
  • Location: Hudson Massachusetts United States
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 06:06:16 (permalink)
0
I know you are EE engineer.  And no, I wasn't surprised AT ALL. 
 
You know what's funny, I broke my neck in a snow skiing accident 28 years ago now, spent 12 years on some MAJOR pain killers to reduce neurogenic pain (to the point of 4 heart attacks), got my masters in computer science at BU during that time but due to medical and pain complications it took me 8 years to do...  When I graduated I couldn't get an interview never mind a job.  I'm scraping by on ssdi and wondering what I could be making if I was out in YOU GUY'S Big boy world grin: grin
 
But alas...  the Robism I have come to live by ~ sometimes the obstacles in our path ARE our path ~
#28
JustRob
Super Member
  • Total Posts : 609
  • Reward points : 0
  • Joined: 2008/09/04 12:49:27
  • Location: Hudson Massachusetts United States
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 06:36:51 (permalink)
+1 (1)
On second thought, that last post probably isn't appropriate for this forum.  I "think" I can remove it...
#29
Jim Nickerson
User 452
  • Total Posts : 6736
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 06:50:51 (permalink)
0
JustRob
I know you are EE engineer.  And no, I wasn't surprised AT ALL. 
 
You know what's funny, I broke my neck in a snow skiing accident 28 years ago now, spent 12 years on some MAJOR pain killers to reduce neurogenic pain (to the point of 4 heart attacks), got my masters in computer science at BU during that time but due to medical and pain complications it took me 8 years to do...  When I graduated I couldn't get an interview never mind a job.  I'm scraping by on ssdi and wondering what I could be making if I was out in YOU GUY'S Big boy world grin: grin
 
But alas...  the Robism I have come to live by ~ sometimes the obstacles in our path ARE our path ~


you can edit your post and change it as you wish
you nor any other mere users have not been granted the ability to "remove" a post
 
#30
du00000001
Just Some Member
  • Total Posts : 3942
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: online
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 06:53:54 (permalink)
+1 (3)
@ Rob
Don't care about appropriate or not!
It's ok and Jim Nicherson has preserved a copy anyway.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#31
Jim Nickerson
User 452
  • Total Posts : 6736
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 06:59:21 (permalink)
+1 (3)
rob,
down on the lower right of your post is a button "edit"
you may edit your post
and yes as I have quoted your post it will remain
 

Attached Image(s)

#32
JustRob
Super Member
  • Total Posts : 609
  • Reward points : 0
  • Joined: 2008/09/04 12:49:27
  • Location: Hudson Massachusetts United States
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 07:16:26 (permalink)
+1 (1)
Thanks Jim
#33
Jim Nickerson
User 452
  • Total Posts : 6736
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 07:17:04 (permalink)
0
rob,
you could request your avatar get enabled in this thread as others have https://www.microchip.com/forums/FindPost/1115106
#34
JustRob
Super Member
  • Total Posts : 609
  • Reward points : 0
  • Joined: 2008/09/04 12:49:27
  • Location: Hudson Massachusetts United States
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 07:52:22 (permalink)
0
Thanks Jim,
 
I gave it a try
#35
JustRob
Super Member
  • Total Posts : 609
  • Reward points : 0
  • Joined: 2008/09/04 12:49:27
  • Location: Hudson Massachusetts United States
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 14:13:16 (permalink)
0
@ric
4/5?
sad: sad
#36
du00000001
Just Some Member
  • Total Posts : 3942
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: online
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 14:51:46 (permalink)
0
I didn't know there were an issue with the avatar.
For me it was just opening my User Control Panel (right at top of any page when logged in), select "Avatar/Profile Photo", upload images and tick the boxes to make use of them (the upper part of that page).
I can recall Rob having an Avatar some time ago (showing him in some chair). Currently he seems to have a profile photo but no avatar.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#37
ric
Super Member
  • Total Posts : 28324
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 14:55:43 (permalink)
+1 (1)
JustRob
@ric4/5?sad: sad

That's a +1, indicating support.
I'd only give a +2 where plainly someone has put in some work providing a useful (And correct) answer to a question.

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#38
JustRob
Super Member
  • Total Posts : 609
  • Reward points : 0
  • Joined: 2008/09/04 12:49:27
  • Location: Hudson Massachusetts United States
  • Status: offline
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 17:31:32 (permalink)
0
I have tried all the different combinations.  No photo...
 

Attached Image(s)

#39
ric
Super Member
  • Total Posts : 28324
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: SPI Slave mode interrupt or not (poll)... 2020/05/12 17:43:45 (permalink)
0
The "Profile photo" and the "Avatar" are seperate.
Plainly you've managed to upload a profile photo.
Did you upload an avatar photo by clicking on the "Upload a file" link just below the "don't use avatar" checkbox?
You may need to use a smaller photo, I think it can only be about 150 pixels high.

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#40
Page: < 12345 > Showing page 2 of 5
Jump to:
© 2020 APG vNext Commercial Version 4.5