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

library 74595 compilation

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



Joined: 15 Apr 2014
Posts: 8
Location: Banned - spammer

View user's profile Send private message Send e-mail

library 74595 compilation
PostPosted: Tue Apr 15, 2014 9:17 pm     Reply with quote

FRIENDS, I was testing the library over 74595 can not compile.
Can someone help me !?

actually I just wanted to compile and move on
74595 expecting an identifier error
alan



Joined: 12 Nov 2012
Posts: 357
Location: South Africa

View user's profile Send private message

PostPosted: Tue Apr 15, 2014 11:28 pm     Reply with quote

Post your compiler version.

Also your FUSES should be directly after your #include <16f84a.h>
Taylor3



Joined: 15 Apr 2014
Posts: 8
Location: Banned - spammer

View user's profile Send private message Send e-mail

taylor3
PostPosted: Wed Apr 16, 2014 2:17 am     Reply with quote

ccs c 4.114

could make a demo?

74595.C how would
Ttelmah



Joined: 11 Mar 2010
Posts: 19436

View user's profile Send private message

PostPosted: Wed Apr 16, 2014 3:28 am     Reply with quote

You have already been told exactly what you need to do....

The key point is that the 'configuration stuff' (fuses, clock settings, RS232 if used etc.), _must_ be setup before they are used.

So the order in CCS is always (with tiny variations):
Code:

///// marker 1
Processor include file
fuses
clock settings
RS232 settings
other setups (I2C etc).
/////marker 2
// Now the stuff between 'marker 1' and 'marker 2', can be separate or
// in an include file or even split up
//but basically (for instance), the clock must be set before RS232 is setup
//Fuses must be set before hardware is used, clock rate must be set
//before delays etc. etc. etc..
Then include other things

Then the main code


EX_EXPIO.c

shows how to use 74595.c

The '595' gives the 'expanded outputs', the '165' the inputs in this example.

Separately, what good is a blank 20 element constant array going to do?. You can't write to it (const), and there is nothing to read from it (empty)....

You do need the 'while' at the end of the code (you have it remmed out). Key is to remember that the code is all there is. Unlike on a PC, where code can exit, and drop 'back' to the operating system, on the PIC, there is nothing to go back to. So the code needs to ensure it stays running, and cannot drop 'off the end'.
Taylor3



Joined: 15 Apr 2014
Posts: 8
Location: Banned - spammer

View user's profile Send private message Send e-mail

Taylor
PostPosted: Thu Apr 17, 2014 7:43 pm     Reply with quote

did not work what could be?

Ttelmah



Joined: 11 Mar 2010
Posts: 19436

View user's profile Send private message

PostPosted: Fri Apr 18, 2014 1:47 am     Reply with quote

First you have probably edited the 74595.c file, and this is why it isn't working. Reload the original version with the compiler. The code compiles correctly with the supplied file. Tested with 5.025, 4.191, and 4.104.

Are you really using a 16F84A!....
Unless you really do need to be using history, get something newer. That was obsolete perhaps 10 years ago.
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