Art Interface Device logo   Project description  Development   Mailing List  Contact


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AID: Bug in AID Firmware

From: Stefan Wiechula   stfn_aidpzooid.org
Date: Sun, 24 Oct 2004 21:03:09 -0700

: Sent via the Art Interface Device mailing list: aid@interaccess.org
: Use your "Reply All" to  reply to the list, "Reply" for private response

Hi Mike,

On Sat, Oct 23, 2004 at 01:49:46PM -0400, mike2004 wrote:
> Some observations that cannot be confirmed due to the lack of a 
> programmer are:
> 
> 1) a newly programmed PIC seems to function correctly and only fails 
> after use. In fact it seems to fail only after use of the AD command.
> 
> 2) a board I am using only exhibits the problem when I use AD commands 
> and does not get stuck in this state. On power up it behaves normally.

Have you tried using code compiled with aid_lib.c revision 1.6?  Last we
talked about this someone (you?) noticed that the ADC module was left
enabled after a conversion and might be sinking or sourcing a lot of
power.  The "fix" in revision 1.6 is line 728, here:

http://cvs.sourceforge.net/viewcvs.py/artinterface/Core/Code-Firmware/AID_LIB.C?annotate=1.6

> It seems to me there is a problem with setting the input or output state 
> of the pins after commands are run.

Data direction registers for the ADC pins (AID_ADC0_TRIS... AID_ADC7_TRIS)
are set to 1 (input) in aid_adc_init (called from aid_mainboard_init, i.e.
at start-up) and not changed thereafter.  If these were the problem,
wouldn't it show up at power up?

If you get the programmer working or have a good chip with a bootloader,
you might try using ADCS0 and ADCS1 (lines 673, 674) to select some
divisor of the system clock rather than "internal RC oscilator" in case
the problem is with that oscilator.  Also, I bet we don't need "ADIE = 1;"
on line 687 since all interupts are disabled by the next two lines.

Good luck,

Stefan.

:      messages saved at http://www.interaccess.org/aid/list
:      unsubscribe/help requests to mailto:Majordomo@interaccess.org