Table LED Matrix, Weeks of debugging, column problems


Closed Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    I don't think using the ULN2004 chip would require recoding. Would the replacement of the 74LS require the coding for the PIC to be different? Should I use an inverter, and if so, can you recommend one? I have been working on this for so long I am losing my mind haha. Here is the sample code I am using

    Code:
    #include <pic.h>
    
    
    __CONFIG(INTIO & WDTDIS & PWRTEN & MCLRDIS &
    UNPROTECT \
    	& UNPROTECT & BORDIS & IESODIS & FCMDIS);
    
    int i, j, k, n, Dlay, CurLetter;
    
    const char Letters[] = {
    	
    	0b0000001, // A
    	0b0000001,
    	0b0000001,
    	0b0000001,
    	0b0000001,
    	
    	0b0000010,
    	0b0000010, // B
    	0b0000010,
    	0b0000010,
    	0b0000010};
    
    main()
    {
    	PORTA = 0;			// All Bits are Low
    	PORTC = 0b000001;	// Start With Top Left
    	CMCON0 = 7;			// Turn Off Comparitors
    	ANSEL = 0;			// Turn Off ADC
    	TRISA = 0b101000;	// RA5/RA3 Inputs
    	TRISC = 0;
    	
    	CurLetter = 0;		// Start With "A"
    	
    	while (1 == 1)		// Loop Forever
    	{
    		for (Dlay = 0; Dlay < 25; Dlay++)
    		 for (i = 0; i < 5; i++)
    		 {
    			 j = Letters[(CurLetter * 5) + i];
    			 k = (j >> 2) & 0b010000;
    			 PORTC = j & 0b111111;
    			 PORTA = k + i;
    			 for  (n = 0; n < 259; n++);	// 4ms Delay
    		}
    
    	CurLetter = (CurLetter +1) % 2; //Increment Letter
    	}
    }
    If you have the time, a quick schem would be great. I am new to all of this, this is my first project. thanks!
    Last edited by mekohler; - 8th November 2007 at 04:27.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

    Default

    The ULN chip is inverter! Of course you will have to change the data driven to output of PIC. Just reverse 1's and 0's.

    Ioannis

  3. #3
    Join Date
    Feb 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Does the 74LS138 and 74HC138 see data in different ways. Is it truly a drop in replacement?

  4. #4
    Join Date
    Sep 2007
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    Before I go about trying to implement some of the suggestions, can anyone explain to me why my row's, when activated, only go to .98V? Also the ouput to my decoder from the PIC is at a constant 1.98, 1.98, .98 V (3 ouputs controlling 5 columns). Why is this so? I posted the code in a few posts back.

  5. #5
    Join Date
    Feb 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Is there a pnp driver just the opposite of the ULN2004?

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mekohler View Post
    Before I go about trying to implement some of the suggestions, can anyone explain to me why my row's, when activated, only go to .98V? Also the ouput to my decoder from the PIC is at a constant 1.98, 1.98, .98 V (3 ouputs controlling 5 columns). Why is this so? I posted the code in a few posts back.
    How are you measuring that voltage? By Multimeter or Oscilloscope?

    Ioannis

  7. #7
    Join Date
    Sep 2007
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    Voltmeter. I have the ground pin connected to the ground of my PSU and the + to the ouput of the respective pin on the PIC. Could it be something in the coding? I am also using the Return output of my PSU for ground.

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

    Default

    You cannot measure the pulses with just an voltmeter. You need for sure an oscilloscope.

    The measurement is an "average" of the pulses. So that value sounds OK on a voltmeter.

    Ioannis

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 07:14
  2. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 23:14
  3. Free Project - 245 LED Display
    By T.Jackson in forum Code Examples
    Replies: 221
    Last Post: - 16th August 2009, 05:59
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 03:30
  5. 18F452 "Unknown Processor" errors
    By schwinn_rider in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th April 2006, 04:56

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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