ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: TS-7260 ADC problem

To:
Subject: Re: [ts-7000] Re: TS-7260 ADC problem
From: Kevin Cozens <>
Date: Wed, 20 Jun 2007 16:46:24 -0400
"sodo.2007" <> wrote:
> I have adapted the ADC code I found here to just sample one input. My
> program has a loop that checks a battery level twice a second. The program
> seems to run fine but after some length of time operating it crashes and
> returns
 > :Assertion 'devmem != -1' failed
 > Aborted

I agree with Phil that you must be opening /dev/mem each time through the loop 
and aren't closing it before the loop starts again.

What you should do is to create (or add to) the initialization routine of your 
program. In the initialization routine you should open /dev/mem, and read the 
A/D configuration information (stored in the EEPROM).

Your main loop will no longer have to deal with opening/closing /dev/mem or 
constantly getting the A/D configuration from EEPROM. This will save time in 
your main loop for other tasks.

When your program is about to shutdown, you should create (or add to) the 
shutdown routine to close /dev/mem.

-- 
Cheers!

Kevin.

http://www.ve3syb.ca/ |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172 |"Same thing we always do, Pinkutus:
| Try to assimilate the world!"
#include <disclaimer/favourite> | -Pinkutus & the Borg


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU