Squirrels have fuzzy tails.
0 Members and 1 Guest are viewing this topic.
I'm not sure waht display you're talking about. The only debug i can do on the uC is with a voltmeter, checking actual pin states in report to what the should be after a given commend.I have a test board with the uC, parallel programmer, a L297 chip mounted and 2 test LEDs.
I want/expect the uC to turn on/off PC4 to generate a clock signal that feeds into the L297 chip, activate 2 ports(PC5 and PC0) giving me 5V, and upon reciving the 'a' character from my laptop, i want a port to switch from on to off, and vice versa.
So far, it executes what i programmed it to do. It runs through the 2nd infinite loop for only 0.5 seconds or 10 second max, the infinite loop deosen't execut forever as it shoul, after x ammount of time it starts over or gets stuck.
int main(void){ configure_ports(); uartInit(); uartSetBaudRate(4800); rprintfInit(uartSendByte); PORT_ON(PORTC,5); PORT_ON(PORTC,0); char f=0; unsigned long int d=35; rprintf("Device READY!\n"); while(1){ f=uartGetByte(); if(f==103){ rprintf("GO!\n"); while(1){ PORT_ON(PORTC,4); rprintf("a\n"); f=uartGetByte(); rprintf("b\n"); delay(d); PORT_OFF(PORTC,4); if(f==97) sens(); } } } return 0;}