I have been given this code to play with, at the moment it is working on a Arduino uno R3 but i will use a atmega1284p, The code is in the attachment below as too big.
In the code he comments about the "wire.h"
IMPORTANT, the wire.h is modified so that the internal pull up resisters are not enabled.
This is required to interface Arduino with the 3.3v Si570's I2C interface.
Now i seen somewhere that there is a level shifter type of thingy, is that right ?.
At this time i am using a unmodified wire.h (i have not got a si570 yet, in post )
I have added 4 more bands (6m,4m,2m(a) and 2m(b).
the 2m(a) displays as 14.4000, but should be 144.0000
the 2m(b) displays as 14.5000, but should be 145.0000
what needs to be done to make it display as i want ?
I think that there might be a few more things that are not right.
void setup(){
lcd.begin(20, 4);
//the "wire" library is modified to disable the internal pull-up resistors
//so that the external 3.3v pull up required with si570 works
Wire.begin();
// Force Si570 to reset to initial freq
i2c_write(si570_i2c_address,135,0x01);
read_si570();
//set the initial frequency
setFrequency(14150000L);
Is it just me or is this setting the freq to 14,150,000Hz? Maybe needs one more zero...
Well 'long' should be able to hold a value like 141,000,000 (up to 2,147,483,647) (http://arduino.cc/en/Reference/Long), but somewhere else in the code you may be overflowing. Changing all long variable declarations to unsigned long and all 'L' constants to be 'UL' may help.
Or, you may be inadvertently getting cast to int somewhere. For example, your display code may be casting your frequency into an int so you may want to add these: