Rockbox Ports are now being developed for various digital audio players!
I read datasheet (something understand =) and test some functions. I could try to implement LCD and Battery driver (both or one of them - choose from you) at this weekend.
I think that NAND driver is more important now.
I don't know how you can only complile one plugin, but you can skip the 'make install' when you write something like this:Code: [Select]cp apps/plugin/myplugin.rock archos/.rockbox/rocks/demos/myplugin.rockWith this code you only copy your plugin and not all the 'unchanged' pars of rockbox.
cp apps/plugin/myplugin.rock archos/.rockbox/rocks/demos/myplugin.rock
I assume you mean "touchscreen" when you say LCD? The actual LCD driver already works...
Yes, it certainly is. You are more than welcome to take a look at that!
I didn't view NAND datasheet yet =)
I think the battery level can be read using ADC1 (see Debug>Hw Info screen). It is just a matter of working out how to translate this value to an actual voltage.
int batStatus;float voltage;pcf50606_write(PCF5060X_ADCC2, 0x1); //0b00000001pcf50606_read_multiple(PCF5060X_ADCS1, outStr, 2);batStatus = (outStr[0]<<2 | outStr[1]& 3); //ADCDAT1H+ADCDAT1Lvoltage = batStatus/1024.0*6.0;snprintf(buf, sizeof(buf), "Battary voltage: %f", voltage);lcd_puts(0, line++, buf);
Quote from: cybergrind on April 11, 2008, 07:25:59 AMI read datasheet (something understand =) and test some functions. I could try to implement LCD and Battery driver (both or one of them - choose from you) at this weekend.I assume you mean "touchscreen" when you say LCD? The actual LCD driver already works... I think the battery level can be read using ADC1 (see Debug>Hw Info screen). It is just a matter of working out how to translate this value to an actual voltage.
int batStatus; int voltage; pcf50606_write(PCF5060X_ADCC2, 0x1); //0b00000001 pcf50606_read_multiple(PCF5060X_ADCS1, outStr, 2); batStatus = (outStr[0]<<2 | outStr[1]& 3); //ADCDAT1H+ADCDAT1L voltage = batStatus*6000/1024; int rest = voltage%1000; snprintf(buf, sizeof(buf), "Battary voltage: %d.%d", voltage/1000, rest); lcd_puts(0, line++, buf);
But I think the same value may also be available direct from the TCC7801 ADCs. That way there's less overhead as there is no I2C read/write involved. A few tests will confirm whether this is true...
Just to be sure. I think you don't understand all. We cannot calculate the level of the battery with volt, because the volt value will always be the same. If you want to calculate the amount of electricity left in a battery, you need to use ampere. Hope that will help you still I can't help with the code and good job. I can't wait to have a rockbox firmware for my d2.
pcf50606_write(PCF5060X_ADCC2, 0x3); //0b00000011 read subtractor....current_voltage = adc_val*2400/1024+3000; //with this formula we can't use BATTERY_SCALE_FACTOR
Page created in 0.105 seconds with 23 queries.