This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Adding 3 byte header to compiled hex file

Hi, I am working on a project with a rf transmitter and receiver. They are really old rf's - nRF24E1. I just want to load a demo program into an EEPROM attached but it says i need to attach a 3 byte header file.

The contents of the 4 lowest bits in the first byte is used by the boot loader to set the
correct SPI frequency. These fields are encoded as shown below:

SPEED (bit 3): EEPROM max speed
0 = 1MHz
1 = 0.5MHz

XO_FREQ (bits 2,1 and 0): Crystal oscillator frequency
000 = 4MHz,
001 = 8MHz,
010 = 12MHz,
011 = 16MHz,
100 = 20MHz

The program eeprep can be used to add this header to a program file.- I have this program

Command format: eeprep [options] <infile> <outfile>
<infile> is the output file of an assembler or compiler
<outfile> is a file suitable for programming the EEPROM (above format with no user
data).
Both files are “Intelhex” format.
The options available for eeprep are:
-c n Set crystal frequency in MHz. Valid numbers are 4, 8, 12, 16 (default)
and 20
-i Ignore checksums
-p n Set program memory size (default 4096 bytes)
-s Select slow EEPROM clock (500KHz)

Any idea how I write the <outfile>? I have the compiled hex file as my <infile> and want to select option s to set the clk at 500kHz.

Thank you