Go Down

Topic: From linear to exponential PWM output (Read 19 times) previous topic - next topic

dhenry

Quote
The lookuptable is filled with data in a seperate function.


Unless you have a mcu with lots of ram, that would be the wrong thing to do.

backbone

Dhenry,

Currently use a Mega so enough Ram or am I mistaken.
An UNO or Nano would be on the edge of Free ram.

Paco



Never to old to learn and I learn every day

dhenry

It uses at least 256 bytes of ram, as coded.

It may not be an issue for your platform but in general, you want to store constant data in the rom.

backbone

You mean to write the lookuptable data everytime it changes in the EEProm and read it from there instead of the lookuptable using sRAM?

Paco
Never to old to learn and I learn every day

robtillaart

You can use PROGMEM - to put the table in ROM - see reference section.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up