Stránka 1 z 1

arduino + analogový tuner FM1216ME - nejde I2C

Napsal: 04 čer 2016, 19:01
od toMajstr
Dobrý den, našel jsem na internetu že tuner FM1216ME se dá použít jako FM přijímač. Kupodivu jsem jeden doma vyhrabal, tak jsem si řekl že to zkusím. Připojil jsem VDD na piny 3 a 10, GND na piny 6 a 12 a I2C jsem propojil s arduinem. Bohužel když jsem zapnul I2C scanner, vyhledávání se zaseklo na prvním "Wire.endTransmission();". Znamená to že je tuner v háji? Nebo co s tím může být špatně?

Tady je celý kód I2C scaneru:

Kód: Vybrat vše

// --------------------------------------
// i2c_scanner
//
// Version 1
//    This program (or code that looks like it)
//    can be found in many places.
//    For example on the Arduino.cc forum.
//    The original author is not know.
// Version 2, Juni 2012, Using Arduino 1.0.1
//     Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26  2013
//    V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
//    by Arduino.cc user Krodal.
//    Changes by louarnold removed.
//    Scanning addresses changed from 0...127 to 1...119,
//    according to the i2c scanner by Nick Gammon
//    http://www.gammon.com.au/forum/?id=10896
// Version 5, March 28, 2013
//    As version 4, but address scans now to 127.
//    A sensor seems to use address 120.
// Version 6, November 27, 2015.
//    Added waiting for the Leonardo serial communication.
//
//
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
//
 
#include <Wire.h>
 
 
void setup()
{
  Wire.begin();
 
  Serial.begin(9600);
  while (!Serial);             // Leonardo: wait for serial monitor
  Serial.println("\nI2C Scanner");
}
 
 
void loop()
{
  byte error, address;
  int nDevices;
 
  Serial.println("Scanning...");
 
  nDevices = 0;
  for(address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();
 
    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");
 
      nDevices++;
    }
    else if (error==4)
    {
      Serial.print("Unknow error at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.println(address,HEX);
    }    
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");
 
  delay(5000);           // wait 5 seconds for next scan
}

Napsal: 04 čer 2016, 19:28
od Cowley
Neco je i tady.
A co je to za Arduino?

Na nekterych obrazcich je +5V na 3 a 13.

Mas tam pullup rezistory na I2C?

Napsal: 04 čer 2016, 19:47
od Cowley
Treba tady s ATTINY...

Napsal: 04 čer 2016, 20:08
od toMajstr
Tak jsem zjistil že jsem idiot a zapojil jsem pullup rezistory na GND, teď už to něco najde na adrese 0x60 :D to je ovšem taky špatně, má to mít adresu 0xC0.

Napsal: 04 čer 2016, 20:14
od Cowley
V tom mem hornim odkazu maji 0x60 - frequenzband :)

Napsal: 04 čer 2016, 21:13
od toMajstr
bohužel němčinou příliš nevládnu, ale zaráží mě ten divnej pinout u druhýho článku.

Napsal: 09 čer 2016, 08:24
od LukinoOl
Taky jsem si s tímto tunerem ze staré TV karty hrál, leč přes HW I2C jsem ho nerozchodil. Zajímavé je, že přes SW I2C (http://playground.arduino.cc/Main/SoftwareI2CLibrary) to jede.

Napsal: 09 čer 2016, 21:07
od toMajstr
mě to na arduino mega vůbec neběhá, nevíš jak to mám nastavit? (arduino uno mi nedávno zemřelo :/ )

Napsal: 10 čer 2016, 08:27
od LukinoOl
A, pročti si tenhle článek ohledně funkce jednotlivých pinů na kartě:
http://pandatron.cz/?665&prijimac_z_ana ... %96_1._dil
B, SDA a SCL připoj na +5V přes 10k odpory (pullup)
C, do Arduina stačí od karty připojit SDA. SCL a GND(musí být společná s arduinem)
D, do arduina nahrej I2C scanner a minimálně bys měl vidět adresu karty

Pokud ano, tak budeme pokračovat, pokud ne, tak namaluj jak to máš zapojený, bez toho se nehnem z místa.

Napsal: 10 čer 2016, 12:42
od toMajstr
najde to adresu 0x60, takže I2C bude zapojený dobře (nebo ne?) , ale těch adres by to mělo najít víc, ne?

Napsal: 10 čer 2016, 18:18
od LukinoOl
A co bys tam chtěl vidět dalšího?

Napsal: 10 čer 2016, 21:07
od toMajstr
Někde jsem četl že tam má být jeden obvod co přepíná filtry a druhej co to celý řídí a každej má svoji adresu.

Napsal: 07 pro 2017, 14:13
od danhard
Zdravím,
podařilo se to rozchodit ?
Nemá někdo zálohu toho článku z Pandatronu ?

Napsal: 08 pro 2017, 20:00
od Habesan