Skip to content

Commit 3ef87e1

Browse files
authored
Update PROGMEM.adoc
The strings have to be in flash whether they are loaded at start up (the default) or when needed. Hence using embed or the F macro should have no impact on the flash use. There is a very small time penalty, about 1 clock cycle per character + a function call I expect, but I don't know enough about how the Atmega works to be certain.
1 parent de455ae commit 3ef87e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Language/Variables/Utilities/PROGMEM.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ When an instruction like :
187187
Serial.print("Write something on the Serial Monitor");
188188
----
189189

190-
is used, the string to be printed is normally saved in RAM. If your sketch prints a lot of stuff on the Serial Monitor, you can easily fill the RAM. If you have free FLASH memory space, you can easily indicate that the string must be saved in FLASH using the syntax:
190+
is used, the string to be printed is normally saved in RAM. If your sketch prints a lot of stuff on the Serial Monitor, you can easily fill the RAM. This can be avoided by not loading strings from the FLASH memory space until they are needed. You can easily indicate that the string is not to be copied to RAM at start up using the syntax:
191191

192192
[source,arduino]
193193
----

0 commit comments

Comments
 (0)