Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
how do pull up registers help in resetting?
I have several boards made exactly the same, all with the same code, all with the same problem.
Does that fuse matter
try changing the code , totally, make another simple code and run it, this way you know its not your code making the problem
Maybe you set brown-out detection too high (4.3 V). So when the voltage to your AVR goes below a setpoint (i.e. fuse setting) the MCU resets?
take the mcu out of the board and put it in a test board,run it and see if it resets there.
you don't have WDT fuse bit enabled by mistake?
Sounds like a Null pointer problem or a jump of the end of an array problem.
while(1){rprintf("output %d",output);}
Did you check the noise levels in the area?I knew some guy how even shielded his AVR for EMI caused by a motor or a relay
volatile u08 uartReadyTx[2];volatile u08 uartBufferedTx[2];// receive and transmit bufferscBuffer uartRxBuffer[2];cBuffer uartTxBuffer[2];unsigned short uartRxOverflow[2];// Omited for clarityvolatile static voidFuncPtru08 UartRxFunc[2];
void uart2Init(void){ // initialize the buffers uart2InitBuffers(); // initialize user receive handlers UartRxFunc[2] = 0; // enable RxD/TxD and interrupts outb(UCSR2B, BV(RXCIE)|BV(TXCIE)|BV(RXEN)|BV(TXEN)); // set default baud rate uartSetBaudRate(2, UART2_DEFAULT_BAUD_RATE); // initialize states uartReadyTx[2] = TRUE; uartBufferedTx[2] = FALSE; // clear overflow count uartRxOverflow[2] = 0; // enable interrupts sei();}
Did you try bypassing the voltage regulator and powering the circuit directly with 5V? Also, do you have .1uF ceramic caps going to ground at every power input to the chip?
For some strange reason, if I send long data streams *into* the Rx port on my microcontroller, it causes a reset!
rprintfInit(uart3SendByte);//define uart portwhile(1) { temp=uart0GetByte();//returns -1 if no data present, takes data from uart port 0 //&0x0F strips ascii off to use in char strings if (temp != -1)//if data received rprintf("%c",temp&0x0F);//transmit to uart port 3 }
// define this key if you wish to use// external RAM for the UART buffers//#define UART_BUFFER_EXTERNAL_RAM#ifdef UART_BUFFER_EXTERNAL_RAM // absolute address of uart0 buffers #define UART0_TX_BUFFER_ADDR 0x1000 #define UART0_RX_BUFFER_ADDR 0x1100 // absolute address of uart1 buffers #define UART1_TX_BUFFER_ADDR 0x1200 #define UART1_RX_BUFFER_ADDR 0x1300 // absolute address of uart2 buffers #define UART2_TX_BUFFER_ADDR 0x1400 #define UART2_RX_BUFFER_ADDR 0x1500 // absolute address of uart3 buffers #define UART3_TX_BUFFER_ADDR 0x1600 #define UART3_RX_BUFFER_ADDR 0x1700#endif
(I never knew accessing data outside of an array could cause a hardware reset . . .)
volatile u08 uartReadyTx[2];
uartReadyTx[2] = TRUE;