[En-Nut-Discussion] Nut/OS in STK300

Janne Jarvinen jjj at iki.fi
Wed Sep 17 18:50:54 CEST 2003


Thanks Harald

You were absolutely right about UART diveder. I replaced UBBR line by my
own manual setup and it worked just fine.
Now I can finally debug scheduling of the example program :)

What about LCD then, you mentioned hw timing.. I have HD44780 based
display connected straight to the PORTA pins, no extra components except
contrast pot.
For whatkind of connection lcd-driver is designed ? I have used Peter
Fleury´s (http://www.mysunrise.ch/users/pfleury/avr-lcd44780.html) way
to access LCD but I would like to use Nut´s own drivers of course.
If it is aimed to connect straight to the pins aswell then only thing I
could imagine is timing difference caused by een 4MHz / 14MHz cpu clock
difference ...?

Janne

> -----Original Message-----
> From: en-nut-discussion-admin at egnite.de 
> [mailto:en-nut-discussion-admin at egnite.de] On Behalf Of Harald Kipp
> Sent: 17. syyskuuta 2003 10:41
> To: en-nut-discussion at egnite.de
> Subject: Re: [En-Nut-Discussion] Nut/OS in STK300
> 
> 
> Hi Janne,
> 
> 
> >Any hints what do I need to change in order to get UART to work in 
> >STK300 meaning in ATMega103 generally ?
> >
> >Is it necessary to enable this flag for example? (STK300 is 
> 4MHz) DEFS 
> >= -DNUT_CPU_FREQ=3686400
> 
> This definition is only required if the 32kHz crystal is not mounted.
> 
> >I saw some comment in sources about this being for 1ms resolution 
> >enable, but what if it is not defined ? Does it make 
> timers&rtc still 
> >to work but with worse resolution ?
> 
> If NUT_CPU_FREQ is not defined, the resolution is 62.5 ms, 
> using the 32 kHz crystal. Taking this as a reference, 
> Ethernut is able to determine its main crystal frequency.
> 
> 
> >Currently app/threads works nicely with 3 different threads blinking 
> >leds with specific speed defined differetnly for each 
> threads. However, 
> >LCD and UART shows random rubbish only ...
> 
> For LCD it may be a hardware timing problem. For the
> UART, check the baudrate table in the ATmega datasheet, 
> specially the deviation.
> 
> 
> >I set nutconf to stk200 and atmega103. Whatever stk200 then 
> defines, I 
> >have no idea.
> 
> The STK200 defines the type of programming adapter you're 
> using. This definition enables to simply call
> 
>    make burn
> 
> on the command line.
> 
> Harald
> 
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de 
> http://www.egnite.de/mailman/listinfo/en-nut-> discussion
> 






More information about the En-Nut-Discussion mailing list