United Kingdom
Asked — Edited

Multiplexing Digital Ports

Hi Guys

Is there anyway to 'multiplex' the 20 digital ports?. I want 6 columns and 14 rows to drive an LED dot matrix using row column addressing. Any thoughts would be greatly appreciated.

Thanks danUK


ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

PRO
Synthiam
#1  

Firstly check out RichieRC's input with his array wizard links: https://synthiam.com/Community/Questions/656

Then check this thread that you had made earlier where Skater had responded with a suggestion: https://synthiam.com/Community/Questions/671

The solution is a 74HC595

You may be able to find an led array that is already assembled to save you time. But i think it'd be more fun to make your own:) That's a lot of soldering though!

United Kingdom
#2  

Thanks DJ

I created the LED array but could not get the LEDs to operate individually.

ports D0 - D5 where the columns (Drivers) and ports D6 - D19 the rows (Select).

It seems I need some C# code to time the drivers to go on and off fast to give the impression that only one LED is 'On'.

However using the 74HC595 might be the only way out if I can't develop some timer code.

Oh yeah the price of solder on the London Stock exchange went through the roof!

PRO
Synthiam
#3  

You will require c# code to turn the led's on. I can help you with the code, if you'd like.

How come the price of solder went up so high? Do you use lead based? ROHC is still pretty expensive though :(

I have no experience with the 74HC595, but it'd be neat to see what you come up with! Share your experiences so we can benefit others. Totally what i love about these forums. Helping people :)

United Kingdom
#4  

Thanks DJ

I've used so much solder lately (non lead based) I should have bought shares in the company!

Love some help with the C#. I'm using Visual studio 2008. If I get something to work i'll share it with the community.

This was my timer test program. I tried to turn on 2 LED's with a time interval between them but the code below turns them both on at the same time (after 10 seconds) This is as far as ive got wtih a timer so far. (new to C#).

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using EZ_B;

namespace timerTest { public partial class Form1 : Form { Timer timer = new Timer();

    public Form1()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {

        timer.Tick += new EventHandler(timer1_Tick); // Everytime timer ticks, timer_Tick will be called
        timer.Interval = (1000) * (1);              // Timer will tick evert second
        timer.Enabled = true;                       // Enable the timer
        timer.Start();
        // Start the timer
        timer.Tick += new EventHandler(timer2_Tick); // Everytime timer ticks, timer_Tick will be called
        timer.Interval = (1000) * (10);              // Timer will tick evert second
        timer.Enabled = true;                       // Enable the timer
        timer.Start();                              // Start the timer
    }

    private void timer1_Tick(object sender, EventArgs e)
    {
        ezB_Connect1.EZB.Digital.SetDigitalPort(EZ_B.Digital.DigitalPortEnum.D0, true);
        
    }

    private void timer2_Tick(object sender, EventArgs e)
    {
        ezB_Connect1.EZB.Digital.SetDigitalPort(EZ_B.Digital.DigitalPortEnum.D1, true);
    }

    private void button2_Click(object sender, EventArgs e)
    {
        ezB_Connect1.EZB.Digital.SetDigitalPort(EZ_B.Digital.DigitalPortEnum.D0, false);
        ezB_Connect1.EZB.Digital.SetDigitalPort(EZ_B.Digital.DigitalPortEnum.D1, false);
    }
}

}