Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Info adc

  1. #1

    Info adc

    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

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,277
    Quote Originally Posted by vlelectroniclab View Post
    Hi everyone,
    Hi
    Quote Originally Posted by vlelectroniclab View Post
    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.
    Quote Originally Posted by vlelectroniclab View Post
    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?
    Quote Originally Posted by vlelectroniclab View Post
    Thank you all
    You are welcome!

  3. #3
    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

  4. #4
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,277
    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...

  5. #5
    But if the micro sd change the hours change? with the eprom it is more difficult !!

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,807
    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
    // https://forum.pjrc.com/threads/45854...l=1#post151035
    
    #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

  7. #7
    Hello, I accept the advice and start hacking.
    Instead to read 4-20ma sensors that you recommend?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •