Info adc

Status
Not open for further replies.

vlelectroniclab

Active member
Hi everyone,
I'm doing a project with teensy3.2 and I wanted to know the maximum input voltage of ADC.
After there is a library for eprom in i2c?
Thank you all
 
Hi everyone,
Hi
I'm doing a project with teensy3.2 and I wanted to know the maximum input voltage of ADC.
Depends on the analogReference() setting in your code: 3.3V, 1.2V or whatever reference voltage between 1.1V and 3.3V you apply to the AREF pin.
After there is a library for eprom in i2c?
There are many I2C libraries. Some are called "wire" or "twi". After that, it depends on the EEPROM. You have to take the documentation of your EEPROM to see how your code has to issue address, read and write commands over I2C. BTW: why not use the internal EEPROM of your Teensy?
Thank you all
You are welcome!
 
Hello,
Thanks for the reply.
I have to make a controller for a grape harvester, and I need the eprom to count the hours of operation and I write it every minute, the internal one does not destroy it doing it?
I use M24256
 
Every EEPROM (internal or external) does wear out after a limited number of write cycles. I would suggest to use a Teensy 3.5 which for only 5$ more has a SD card slot. SD cards are easier to replace than EEPROM. And they have more Memory, so, instead of rewriting the same EEPROM region over and over, you may write many different files with date and timestamps until the 4GB are full...
 
Do you have a 3V battery on the VBat pin? If there was one the RTC has a block of NVRAM that is battery backed.

I just ran this on a T_3.6 and it worked to plug and unplug quickly - but a T_3.1 lost it quickly with no VBat power.

With a 3V battery on VBat&GND this survives unplugging on T_3.1 - and on each reset or restart the values are updated and displayed.

The comment shows where the code came from

Code:
//  Battery backed NV RAM
// [URL="https://forum.pjrc.com/threads/45854-Battery-backed-NV-RAM?p=151035&viewfull=1#post151035"]https://forum.pjrc.com/threads/45854-Battery-backed-NV-RAM?p=151035&viewfull=1#post151035[/URL]

#define NVRAM_UINT32 ((uint32_t *)0x4003E000)
#define NVRAM_UINT16 ((uint16_t *)NVRAM_UINT32)

void setup() {
	Serial.begin(57600);
	while (!Serial && millis() < 4000 );
	Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
	for ( int ii = 0; ii < 14; ii++ ) {
		Serial.println( NVRAM_UINT16[ii] );
		NVRAM_UINT16[ii] += ii * ii;
	}
}

void loop() {
}

Using this for minute by minute updates and then doing an hourly update would reduce the updates a great deal.

The T_3.1 includes 2 KBytes of EEPROM
 
Status
Not open for further replies.
Back
Top