> Date: Mon, 30 Jan 2006 13:42:05 -0800
> From: Dave Hylands <dhylands@...>
> To: gumstix-users@...
> Subject: Re: [Gumstix-users] Input Capture Pin and external interrupts on
> the robostix
> Reply-To: gumstix-users@...
> Just wanted to make sure that you were aware that the ATMega128 has
> two hardware UARTs. So it isn't clear to me why you would want to use
> INT2 to do a software UART when you could jsut use the hardware UART.
> Or are you trying to do the trick where you rely on the 0v and 5v to
> work with an external device that has RS-232 outputs? You'll
> definitely want some kind of protection circuitry on the input side.
> If a device presents a real -12v you could fry your robostix.
Yeah thats what i'm trying to do. The device i've been testing with (an
old Psion 5mx PDA) seems to give about -10v, but I guess a PC might be
more and I'll definately need some resistors if I do hook it up to a PC
which goes any higher. Which may defeat the point of this exercise which
was to avoid using a MAX232.
I've used the same trick before between a Basic Stamp and the Psion and
that worked fine. Although it was a lot easier as the Stamp has an invert
mode in its hardware UART.
Even if I don't end up using the software UART, I'd like to get an
interrupt handler working as I need to use external interrupts for other
> Which pin are you connecting your input to? (you mention interrupt pin
> - but I just wanted to clarify exactly which physical pin you're using
> on the robostix.
The UART1 recevive pin. Basically i'm using the same pins i'd use if I
were using UART1, but they are being driven by software instead of
> I don't see anything obvious wrong with your code. I'll try compiling
> it and running it on my robostix when I get home.
I think the problem lies in the interrupt vector table. When I disassemble
the code in AVR Studio, the vector table shows no entry for the handler
and when I trigger the interrupt in the AVR Studio simulator it just
causes a reset. I think this maybe caused by me lacking a compiler option
(or using one that I shouldn't be). I've been doing the compilation by
just hitting compile in AVR Studio.
Intelligent Robotics Group
Department of Computer Science
University of Wales, Aberystwyth