View previous topic :: View next topic |
Author |
Message |
Gerd
Joined: 15 Dec 2003 Posts: 6
|
Code not working on 16F872? |
Posted: Wed Dec 17, 2003 12:02 pm |
|
|
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
|
|
Posted: Wed Dec 17, 2003 5:16 pm |
|
|
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
|
version? |
Posted: Wed Dec 17, 2003 5:49 pm |
|
|
... 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
|
|
Posted: Thu Dec 18, 2003 1:17 am |
|
|
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 |
|
|
|