CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Using SDI pin as GPIO with 16f88

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
widdly



Joined: 04 Jun 2015
Posts: 2

View user's profile Send private message

Using SDI pin as GPIO with 16f88
PostPosted: Thu Jun 04, 2015 7:41 pm     Reply with quote

I am working on a design using a PIC 16f88 to control a MCP4822 DAC via the hardware SPI. The SPI is working properly and I can send data to the DAC.

However, since I am only outputting SPI data, I would like to use the SDI pin as a digital input connected to a mechanical switch. I am not sure if/how I can do this.

The SPI transactions occur periodically inside the timer0 ISR. I would like to read the input pin in the main loop.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jun 04, 2015 8:17 pm     Reply with quote

See this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=45914
widdly



Joined: 04 Jun 2015
Posts: 2

View user's profile Send private message

PostPosted: Thu Jun 04, 2015 9:27 pm     Reply with quote

Thanks PCM programmer. I'll give it a try tonight.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group