No such memory with pic 16f877 (by Libero)
Hallo. I'm trying to realize a simple application for a church near my home.
In this application ther are 30 lamp-candles and a "gettoniera". When a coin is put into "gettoniera" a contact will be closed and the first lamp-candle goes on for 30 minutes. If another coin is putted in goes on the second lamp-candle and so.
I have used 30 TOFF to measure the time on for each lamp-candle but when I try to compile the program I have a message "not enaugh memory..." If I reduce the lamps to 27 and compile, the compiler uses only 3639/8192 words and 44% memory.
How can I solve this problem?
I can't set a TOFF more than 1.600 sec, how is possible to set it to 1.800 minuts?
Thank's Libero.
(no subject) (by liberolibero)
@ Oliver Quirion
Thank's, TOFF problem is resolved
Now I have only the great memory problem.
I hope it is possible to have a solution.
Libero.
(no subject) (by Jonathan Westhues)
As noted in the error message, timers are limited to 32767 cycle times; for an 1800 s delay, that implies a cycle time of at least 55 ms. So as Olivier notes, an increase to 100 ms will fix your problem.
You still have plenty of flash, but the 30-candle version runs out of RAM. It may barely fit if you simplify your program; for example, the RMx internal relays seem to all be equal to each other, so that can be collapsed down to a single bit. The RMLx relays could also be eliminated by moving the lamp test feature into the same rung as the TOF timers.
Or, you could go to a part with more available RAM, for example most of the AVRs.