Table LED Matrix, Weeks of debugging, column problems


Results 1 to 28 of 28

Threaded View

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

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