Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

RE: [AVR-Chat] Re: Bootup/reset very big problem

2005-02-03 by Javier Fiasche

I belive stack inicialization is made by Codevision C compiler. Watchdog
isnt used at this moment. It should be turned off

Thanks
Javier

-----Mensaje original-----
De: Mark Jordan [mailto:mark@cpovo.net]
Enviado el: Jueves, 03 de Febrero de 2005 01:14 p.m.
Para: AVR-Chat@yahoogroups.com
Asunto: RE: [AVR-Chat] Re: Bootup/reset very big problem



      I didn't find the STACK initialization.
      And the Watchdog, too.

      Mark Jordan

On 3 Feb 2005 at 12:56, Javier Fiasche wrote:

>
> Here goes the inicialization routine
>
>
> void init_mega32(void)
> {
>
> #ifndef DEGUB
>  MCUCSR|=0x80;// Disable JTAG
> #endif
>
> // Port A initialization
> PORTA=0b00001000;
> DDRA=0b00001000;
>  // Port B initialization
>  DDRB=0b00000000;
>  PORTB=0b00001111;
>  // Port C initialization
> DDRC=0b10110000;
> PORTC=0b10000000;
> // Port D initialization
> DDRD=0b11100000;
> PORTD=0b00000000;
>
> // Timer/Counter 0 initialization
> // Clock source: System Clock
> // Clock value: Timer 0 Stopped
> // Mode: Normal top=FFh
> // OC0 output: Disconnected
> TCCR0=0x00;
> TCNT0=0x00;
> OCR0=0x00;
>
> // Timer/Counter 1 initialization
> // Clock source: System Clock
> // Clock value: Timer 1 Stopped
> // Mode: Normal top=FFFFh
> // OC1A output: Discon.
> // OC1B output: Discon.
> // Noise Canceler: Off
> // Input Capture on Falling Edge
> TCCR1A=0x00;
> TCCR1B=0x00;
> TCNT1H=0x00;
> TCNT1L=0x00;
> OCR1AH=0x00;
> OCR1AL=0x00;
> OCR1BH=0x00;
> OCR1BL=0x00;
>
> // Timer/Counter 2 initialization
> // Clock source: System Clock
> // Clock value: Timer 2 Stopped
> // Mode: Normal top=FFh
> // OC2 output: Disconnected
> ASSR=0x00;
> TCCR2=0x00;
> TCNT2=0x00;
> OCR2=0x00;
>
> // External Interrupt(s) initialization
> // INT0: Off
> // INT1: Off
> // INT2: Off
> GICR|=0x00;
> MCUCR=0x00;
>
> // Timer(s)/Counter(s) Interrupt(s) initialization
> TIMSK=0x00;
>
> // USART initialization
> // Communication Parameters: 8 Data, 1 Stop, No Parity
> // USART Receiver: On
> // USART Transmitter: On
> // USART Mode: Asynchronous
> // USART Baud rate: 9600 (Double Speed Mode)
> UCSRA=0x02;
> UCSRB=0x18;
> UCSRC=0x86;
> UBRRH=0x00;
> UBRRL=0x0C;
>
> // Analog Comparator initialization
> // Analog Comparator: Off
> // Analog Comparator Input Capture by Timer/Counter 1: Off
> // Analog Comparator Output: Off
> ACSR=0x80;
> SFIOR=0x00;
>
> }
>
>
>
> Any ideas???
>
>
> thanks javier




----------------------------------------------------------------------------
----
Yahoo! Groups Links

  a.. To visit your group on the web, go to:
  http://groups.yahoo.com/group/AVR-Chat/

  b.. To unsubscribe from this group, send an email to:
  AVR-Chat-unsubscribe@yahoogroups.com

  c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

______________________________
Visita http://www.tutopia.com y comienza a navegar m�s r�pido en Internet. Tutopia es Internet para todos.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.