LED CUBE Controller for PIC16F688

Status
Not open for further replies.

NFPN

New Member
Hi
I´m doing a 64 led´s cube and im using your project has base. I have a problem programing the pic in C, i can´t get right the impulses from the pic to the driver.
Can anyone help me out????

I´m using the program Pic C Compiler to created the program.
Here is the site where i took the info http://picprojects.org.uk/projects/lc/. They use assembley but I want to create a C code

This is the code i´m want to use


#include <16f688.h>
#fuses XT,NOWDT,NOPROTECT
#use delay(clock=4000000)

#define LED1 PIN_A0
#define LED2 PIN_A1
#define LED3 PIN_A2//clock
#define TRANS1 PIN_C0
#define TRANS2 PIN_C1
#define TRANS3 PIN_C2
#define TRANS4 PIN_C3



int1 aux=0;

#INT_TIMER0
void clock_isr()
{
if(aux=0)
{
output_low(PIN_A2);
aux++;
}
else
{
output_high(PIN_A2);
aux=0;
}

}


void main()
{

setup_TIMER_0(T1_INTERNAL|T1_DIV_BY_8);
enable_interrupts(INT_TIMER0);
enable_interrupts(GLOBAL);


while(1);
{
output_high(PIN_C0);//TRANSISTOR layer1
delay_ms(500);
output_low(PIN_C0);
delay_ms(500);

output_high(PIN_C1);//TRANSISTOR layer 2
delay_ms(1000);
output_low(PIN_C1);

output_high(PIN_C2);//TRANSISTOR layer 3
delay_ms(1000);
output_low(PIN_C2);

output_high(PIN_C3);//TRANSISTOR layer 4
delay_ms(1000);
output_low(PIN_C3);

}
}



Thank you in advance
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…