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 CCS Technical Support

Code not working on 16F872?

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



Joined: 15 Dec 2003
Posts: 6

View user's profile Send private message

Code not working on 16F872?
PostPosted: Wed Dec 17, 2003 12:02 pm     Reply with quote

Hi all,

my code is not working on 16F872, but when I recompile it for 16F873 or 16F876a it works perfektly. Why!?

I'm using this amond of resorsses on a 16F872

ROM used: 676 (33%)
Largest free fragment is 1372
RAM used: 86 (67%) at main() level
93 (73%) worst case
Stack: 3 worst case (2 in main + 1 for interrupts)


I'm having this problem a couple of days now and give up, soon.

see also topic "Any experience with Slave I2C"
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Wed Dec 17, 2003 5:16 pm     Reply with quote

Your resource usage looks fine. It's hard to say what the problem is without some more information. Post your code, and tell us what feature of it works on 16F873 but not on 16F872. Then we might be able to help you.
dazlogan



Joined: 19 Oct 2003
Posts: 24
Location: Cambridge, UK

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

version?
PostPosted: Wed Dec 17, 2003 5:49 pm     Reply with quote

... and what version of compiler you are using.

Sorry to say it, but there are some gotchas in the earlier versions.

I've seen the same thing, I had to upgrade my compiler.

Not saying this is definitely the case but be warned!.

Regards,
Darren
Gerd



Joined: 15 Dec 2003
Posts: 6

View user's profile Send private message

PostPosted: Thu Dec 18, 2003 1:17 am     Reply with quote

Hello dazlogan
version is the latest 3.180, just got it for this reason could be a Compiler error. I allso tried version 2.770 from a friend.

Hello Haplo,

the 16F872 is a I2C slave using example Ex-slave.c as it is and read analogs in the main loop. I now the main loop is still running and I can see the analog readings, but I2C stops working. SDA low forever.
see my earlier subjekt.


Thanks to all
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