Dan, Latest version of my code will always be available in my github repository: https://github.com/sarfata/radiono The code I was mentioning yesterday has already been merged by Farhan and so you will get all my changes in the official version which is available here: https://github.com/afarhan/radiono The rest of the discussion is about what is the best way to calibrate: 1 - Using factory calibration settings in the chip - but we need a way for the user to find out this frequency and give it to the program (maybe through a menu like what Mac suggested) 2 - Starting with no calibration and a fixed output frequency (10Mhz). Ask the user to adjust until it is perfectly 10mhz. Both method will play nicely with my changes. Nothing was lost ;) best, thomas On Mon, Feb 10, 2014 at 9:50 AM, Dan Reynolds <on30ng@xxxxxxxxx> wrote: > Thomas, I would still like to see your code if possible. > > > 73 > Dan -- KB9JLO > https://sites.google.com/site/on30ng/ > > > On Sun, Feb 9, 2014 at 8:27 PM, Thomas Sarlandie <thomas@xxxxxxxxxxxxx>wrote: > >> Hi everyone! >> >> Spent some time this week-end on the Radiono software. I found out >> earlier this week that my Si570 had a very large error that grew linearly >> with frequency. We quickly found out that each module is different and you >> need to use calibration information that is saved in the module. The >> current source code has Farhan's si570 calibration hardcoded in. That will >> most likely not work for you. >> >> I have updated the Radiono source code to automatically get the >> calibration information and calculate the crystal frequency every time we >> start the program. The only information that needs to be defined in the >> source code is the default frequency programmed by the factory. In my case >> it was 56.320 but your mileage may vary. >> >> There are two ways to find this frequency: >> - Spec: Look on the marking on your Si570 (mine says CAC000141) and >> lookup some tables online to find which frequency corresponds to your >> marking (I cant find this table, if someone has it, please share!) >> - Experimental: just remove the Arduino and apply power to the control >> board. Measure the frequency at the output of the Si570. >> >> I have updated the wiki: http://www.hfsignals.org/index.php/Si570 >> >> The updated source code has been submitted to Farhan in a pull-request: >> https://github.com/afarhan/radiono/pull/4 >> >> Full list of changes: >> >> Split the Si570 code in a separate class. >> >> In the Si570 class: >> * Use the factory-calibrated output frequency to automatically calculate >> the internal crystal frequency and use that instead of hard coded values. >> * During initialization detect errors talking to the Si570. >> * Use multi-bytes i2c reads and writes when possible (ie: read/write >> multiple bytes without re-starting a transaction). Only works for >> read/writes in consecutive registers. >> * Use types with explicit size where that makes sense (uint8_t instead of >> char, uint64_t, etc) >> * Added some debugging on the serial console through a "debug" function >> >> In the main sketch: >> * Show a message on the LCD if the Si570 is unreachable. >> * Initialize the serial port for debugging >> * Fix some compilation warnings with string litterals being casted to >> char* >> * Removed unused variables >> >> >> And now, back to the soldering iron! >> >> 73, >> thomas >> > >