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

spi problem pls help me to solve

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



Joined: 22 Jun 2008
Posts: 20
Location: trivandrum

View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger

spi problem pls help me to solve
PostPosted: Mon Sep 08, 2008 11:09 pm     Reply with quote

pls help its urgent....i dont know is it possible or not...
I want to configure more than one pin in pic16f877a for spi data out, because i am using shift registers that are connected to pins of pic16f877a. I am using same clock and output enable for all shift registers. In pic total 33 i/o pins and I am using two pins for clock and output enable. Can we configure rest of these 31 pins for spi data write ? Please help me to solve this problem.
_________________
nn
Ttelmah
Guest







PostPosted: Tue Sep 09, 2008 2:54 am     Reply with quote

Not really.
The PIC, has _one_ hardware SPI port. As such, this can only use the defined hardware pins.
_However_, you can generate 'SPI' outputs, using 'software SPI'. There are implementations of this, in literally dozens of the 'example' files. If you have a late (V4) compiler, there is also an implementation 'built in', by using the later SPI setup syntax and streams. However, the 'quality' of this is arguable....
Software SPI, will always use a lot of processor time.
Why not use the chip's 'select' pins?. The normal way to implement this, is to connect _all_ the chip's data inputs to the single PIC output, and use their individual select pins to control which one you are talking to. If the chips don't have select pins, then add a CMOS or TTL multiplexer chip on the clock line. So (for instance), if you connect the SPI clock line from the PIC, to the 'enable' pin of a 74LS139, then connect two data output pins to the two 'select' inputs, you can just put the required 'target number' onto these two pins (0 to 3), operate the SPI, and the clock will become available on one of the four 'Y' outputs, according to what number you select.

Best Wishes
binu.kr



Joined: 22 Jun 2008
Posts: 20
Location: trivandrum

View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger

thank u
PostPosted: Tue Sep 09, 2008 3:35 am     Reply with quote

thanks..........................i will try
_________________
nn
binu_Skr
Guest







l293d problem
PostPosted: Tue Nov 25, 2008 2:43 am     Reply with quote

I am making a robot with both automatic and manual control. I am using L293d to drive the dc motor. I am using two 12v dc motors. I am not using a protection circuit (means diode circuit for L293d). It works properly in manual mode. I am using RF transmitter and receiver for manual remote control. Through remote I can also switch to automatic mode. But in automatic mode it just moves and stops while using 12v to 8th pin of L293d. But it moves some more time while using less than 9v to 8th pin of L293d. Can you please help me to solve this problem ?
_________________
nn
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