Pages: [1]   Go Down
Author Topic: TIL-306 wiring  (Read 1980 times)
0 Members and 1 Guest are viewing this topic.
Teesside
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hiya, i have recently dug out some old electronics bits i had put to one side. one of them is a 16 pin 7 Seg display, with its own micro controller (TIL-306). I am just trying to wire this up to an Arduino so that i can either count button presses or send something from the Arduino to it. If any one could help that would be great  smiley. Thanks in advance.

Oh the Datasheet for the TIL-306 is attached

* datasheet (6).pdf (142.19 KB - downloaded 22 times.)
Logged

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1658
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is a quick way to test/experiment with TIL307/TIL307

NOTE: LATCH should occur before a CLEAR and BOTH LATCH and CLEAR should be held HIGH until you want to either LATCH or CLEAR the counter, at which point the respective pin is set LOW.



* 307.JPG (34.95 KB, 547x363 - viewed 82 times.)
« Last Edit: February 01, 2011, 09:43:35 am by pwillard » Logged

Teesside
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thats great thanks PWillard, now i'm having a little trouble actually getting it working though so i will explain what i have done to try and make it count.

I have an Arduino Mega 1280 By the way.

I have connected the following
Latch to Pin 22
Clear to Pin 23
Pulse to Pin 24

The code i am using is below
Code:
const int Latch = 22;
const int Clear = 23;
const int Pulse = 24;

void setup() {               

  pinMode(Latch, OUTPUT);     
  pinMode(Clear, OUTPUT);
  pinMode(Pulse, OUTPUT);
  digitalWrite(Latch, HIGH);   // set the LED on
  delay(500);
  digitalWrite(Clear, LOW);   // set the LED on
  delay(500);
  digitalWrite(Clear, HIGH);   // set the LED on
  delay(500);

 
}

void loop() {
  digitalWrite(Pulse, LOW);   // set the LED on
  delay(500);
  digitalWrite(Pulse, HIGH);   // set the LED on
  delay(2500);
}

I am simply trying to get it to count up to 5. But it seems to just show random numbers sometimes smiley-confuse. Is there something i am doing wrong?
Logged

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1658
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Um... this is sort of tricky... I'll see if I can write up a some sample code for you.  I have a number of these parts I can play with from an old Frequency Counter project.

OK, this was quick:

You were on the right track...  I misled you about LATCH... sorry.

Code:
// NOTE currently setup to clear counter at 7

const int Latch = 12;  // Different PINS (BOARDUINO)
const int Clear = 3;
const int Pulse = 2;
int counter;

//----------------------------------------------------
void setup() {               
  // PIN PRESETS
  pinMode(Latch, OUTPUT);     
  pinMode(Clear, OUTPUT);
  pinMode(Pulse, OUTPUT);
  // Initialize latch and clear settings to
  // allow COUNT mode

  //       +--------------
  // ______|                LATCH

  digitalWrite(Latch, HIGH); // LOCK THE DISPLAY
  delay(100);

  //       +--------------
  // ______|                PULSE

  digitalWrite(Clear, HIGH); // Leave CLEAR HIGH to allow counting
  delay(100);
  counter = 0;

 // use serial monitor for debugging
 Serial.begin(9600);
}

//----------------------------------------------------
void loop() {
  counter = counter++;
  Serial.println(counter,DEC);
  // -----+
  //      |_______________  LATCH
 
  digitalWrite(Latch, LOW);  // LATCH LOW to COUNT

  //       +------+
  // ______|      |______  PULSE
  digitalWrite(Pulse, LOW);   
  delay(100);
  digitalWrite(Pulse, HIGH);  // PULSE TOGGLE to count up
  delay(100);
  digitalWrite(Pulse, LOW);   
  delay(1000); // So we can see stuff happen

  //---------------------------------------------------
  // --SOME DEBUG--
  // COUNT TO 7 to show how CLEAR works
  if (counter == 7) {
    Serial.println("clear");
 // Set COUNT to Zero on Display
 // ------+       +-------
 //       |_______|        CLEAR

    digitalWrite(Clear, LOW);
    delay(100);
    digitalWrite(Clear, HIGH);
    delay(1000);  // So we can see stuff happen
    counter = 0;
  }
}

 
« Last Edit: February 02, 2011, 06:47:21 am by pwillard » Logged

Teesside
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you, I am not able to try this out right away but will let you know the results asap smiley
Logged

Teesside
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got this working fine, then added a second TIL-306 and it seems to count to 16 before it resets? i will look into this and post the results if i figure it out. Thanks for the help smiley.
Logged

Pages: [1]   Go Up
Jump to: