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
If you have the time, a quick schem would be great. I am new to all of this, this is my first project. thanks!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 } }




Bookmarks