Hello David,
welcome to the club!

On 10/25/2012 08:17 PM, David Wallis wrote:
> Hi all,
> 
> Sorry for using this list for help, but I'm not sure where else to go. I am
> new to Forth (although I've been aware of it since the days of the Jupiter
> Ace when I was at school!), but I have an AVR project to do and I thought
> I'd give amforth a try.
> 
> My question is, is there an easy way of using a second (hardware) uart with
> amforth? I am using an atmega324pu. I have amforth running on it nicely and
> I can communicate with usart1 in Forth very simply by setting it up and
> reading/writing UDR1. But I'd like interrupt driven RX on uart1. I can
> implement this by hand (I've done it before in C) if I have to, but is
> there an easier/cleaner way? Has it already been implemented? If so, can
> anyone point me (in Forth newbie language) in the direction of how to do it?

I'm not sure, if I understand your question correctly.
a. are you trying to use usart1 instead of usart0? Or
b. are you trying to use both usart1 and usart0 "simultaneously"?


If you just want to move the connection to usart1 then there
is a line in template.asm:

; define which usart to use.
.include "drivers/usart_0.asm"
------------------------^
If you change that to usart_1.asm, you should be all set.
If that does not assemble, I'd consider it a bug.



If you want to communicate on both usarts, I do not have good
answers. Two connections at the same time? Serviced by multi-tasking?
One line to control some other device? Don't hesitate to come
up with details ...


Cheers,
Erich

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to