Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | EEPROM timing

Discussion forum for the BasicX family of microcontroller chips.

EEPROM timing - Skala, Mark A Mark - Oct 11 8:54:00 2001

> Hi all,
> Before I go trying to fix this myself, thought I'd ask if anyone
> knows the answer. The question is on the timing of writing
> to the EEPROM (persistent variables) on the BX-24. I have
> an application which is data-logging for 200 samples, 20 per
> second. There is not enough ram for this so I am storing in
> EEPROM every 50ms. I am getting the samples using timer1
> and the hardware interrupt capture pin 12 (not using the
> InputCapture command).
>
> About 5% of the time, the eeprom write disrupts my polling
> loop on the input capture flag which has to be checked at
> least once every 2ms. So what happens is I get a bogus
> result if I miss a transition due to the eeprom write.
>
> The documentation is not clear on when the parts of
> the eeprom write cycle take place. Is there any way
> to force this? I don't think I would have any problems if
> I could write to eeprom immediately (takes ~5ms), then
> start polling again with 45ms before the next write,
> but that doesn't seem to happen automatically every
> time.
>
> Thanks for the help,
> Mark Skala





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: EEPROM timing - Dave Houston - Oct 11 9:25:00 2001

Are you sure it's the EEPROM write that is causing the disruption?

When I tried using the InputCapture pin to do my own capture of a 32
bit pulse train of about 65ms total duration, I found that each
capture went blooey about 2/3 of the way through.

I think the OS was up to something in the background. I switched to
the Interrupt pin and can now capture the bits with no problem.

On 11 Oct 2001, at 9:54, Skala, Mark A (Mark) wrote:

> > Hi all,
> > Before I go trying to fix this myself, thought I'd ask if anyone
> > knows the answer. The question is on the timing of writing
> > to the EEPROM (persistent variables) on the BX-24. I have
> > an application which is data-logging for 200 samples, 20 per
> > second. There is not enough ram for this so I am storing in
> > EEPROM every 50ms. I am getting the samples using timer1
> > and the hardware interrupt capture pin 12 (not using the
> > InputCapture command).
> >
> > About 5% of the time, the eeprom write disrupts my polling
> > loop on the input capture flag which has to be checked at
> > least once every 2ms. So what happens is I get a bogus
> > result if I miss a transition due to the eeprom write.
> >
> > The documentation is not clear on when the parts of
> > the eeprom write cycle take place. Is there any way
> > to force this? I don't think I would have any problems if
> > I could write to eeprom immediately (takes ~5ms), then
> > start polling again with 45ms before the next write,
> > but that doesn't seem to happen automatically every
> > time.
> >
> > Thanks for the help,
> > Mark Skala
> >
> >
> >
> >
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~--> Get your FREE VeriSign guide to security
> solutions for your web site: encrypting transactions, securing
> intranets, and more!
> http://us.click.yahoo.com/UnN2wB/m5_CAA/yigFAA/CFFolB/TM
> ---------------------------------------------------------------------~
> - >
> ---
http://www.laser.com/dhouston/




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: EEPROM timing - Mark Skala - Oct 11 17:34:00 2001

Dave,
I can't measure time accurately on another pin, pin 12
is the one connected to the Atmel chip and its timer/
capture flag register. I know it's the eeprom because
if I use the same code without the write, it is okay all
the time.
Thanks,
Mark Skala

----- Original Message -----
From: "Dave Houston" <>
To: <>
Sent: Thursday, October 11, 2001 10:25 AM
Subject: Re: [BasicX] EEPROM timing > Are you sure it's the EEPROM write that is causing the disruption?
>
> When I tried using the InputCapture pin to do my own capture of a 32
> bit pulse train of about 65ms total duration, I found that each
> capture went blooey about 2/3 of the way through.
>
> I think the OS was up to something in the background. I switched to
> the Interrupt pin and can now capture the bits with no problem.
>
> On 11 Oct 2001, at 9:54, Skala, Mark A (Mark) wrote:
>
> > > Hi all,
> > > Before I go trying to fix this myself, thought I'd ask if anyone
> > > knows the answer. The question is on the timing of writing
> > > to the EEPROM (persistent variables) on the BX-24. I have
> > > an application which is data-logging for 200 samples, 20 per
> > > second. There is not enough ram for this so I am storing in
> > > EEPROM every 50ms. I am getting the samples using timer1
> > > and the hardware interrupt capture pin 12 (not using the
> > > InputCapture command).
> > >
> > > About 5% of the time, the eeprom write disrupts my polling
> > > loop on the input capture flag which has to be checked at
> > > least once every 2ms. So what happens is I get a bogus
> > > result if I miss a transition due to the eeprom write.
> > >
> > > The documentation is not clear on when the parts of
> > > the eeprom write cycle take place. Is there any way
> > > to force this? I don't think I would have any problems if
> > > I could write to eeprom immediately (takes ~5ms), then
> > > start polling again with 45ms before the next write,
> > > but that doesn't seem to happen automatically every
> > > time.
> > >
> > > Thanks for the help,
> > > Mark Skala
> > >
> > >
> > >
> > >
> >
> > ------------------------ Yahoo! Groups Sponsor
> > ---------------------~--> Get your FREE VeriSign guide to security
> > solutions for your web site: encrypting transactions, securing
> > intranets, and more!
> > http://us.click.yahoo.com/UnN2wB/m5_CAA/yigFAA/CFFolB/TM
> > ---------------------------------------------------------------------~
> > ->
> >
> >
> >
> >
> >
> >
> > ---
> http://www.laser.com/dhouston/





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )