Thank you, I will try to read the datasheet more in detail as well.
But is good to know that the syntax is supposed to be just OSCCAL=0x3D. I will try that and see if it compiles at least.
By the way, at http://www.avrfreaks.net/modules/FreaksArticles/files/21/Why%20you%20need%20a%20Clock%20Source.pdf they say that the procedure is more or less the following one:
1) use STK500 or similar to do the calibration and get the calibration byte value that you should use.
2) write that value to the eeprom to some known position
3) read that value from your sketch and copy it to OSCCAL,
Do you know if the contents of the eeprom will be erased when loading a new Arduino sketch? or does it only overwrites the data it needs? I was thinking that maybe I can store it at the end of the eeprom.
Anyway, I will try this when I receive my AVR programmer and I will post the result in here.