This is the first time I've posted in the forum so hopefully it's in the right bit!
I'm currently writing code in C using Codewarrior for an MC9S12C128 which will control an Avago mouse sensor. I have a 2Kb text file containing ASCII values which make up the configuration program for the mouse sensor. I'm trying to work out the best way to download this data to the mouse chip. I am using SPI from the microcontroller. The first byte of data sent via the MOSI line is the sensor's register, and then the program should be presented on the MOSI line one byte at a time.
I think the best way to do this is to store the program into an array of chars, but I can't work out how to translate a text file with each line containing a 2-character byte into an array without manually copying the ASCII data into Codewarrior. Is there an easy way to do this?