Shop OBEX P1 Docs P2 Docs Learn Events
Question about clock frequency and ADC with BS2 — Parallax Forums

Question about clock frequency and ADC with BS2

whymaybewhymaybe Posts: 5
edited 2006-11-26 03:26 in BASIC Stamp
Hello all,
I am a newbie of Basic Stamp. Recently I've got a used BS2 education kit from my friend and I am trying to implement it with a gameboy camera.
So here are two questions I want to ask (I've been trying to search the forum but have no luck and I am tired):
1) Is it possible to make a clock function (pulse train?) which has frequency around 500 khz (period around 2 us); I have tried two methods, one with HIGH and LOW pin which gives me about 500 us (its too slow), the other one is using Pulseout, which gives a 2 us high time but the low time takes for a while and the whole period is about 300 us. I am wondering if it is the loop thing that delay the process and I want to know how fast I could have a clock generated.
2) how fast can I read from Analog signal? say if I have an external ADC chip, how fast can the BS2 digital port read?

p.s. I am using the lowest level of BS2 controller.


Thanks a lot.

Comments

  • whymaybewhymaybe Posts: 5
    edited 2006-11-24 16:13
    Does anybody have any idea about it? Its kinda urgent for my project.
    Thanks.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-11-24 16:24
    1)· Yes, it's the instruction execution speed that's killing you here.· BS2 has PULSOUT, but not pulse train out.· You might consider a 7555-based oscillator for this, with the BS-2 enabling/gating its output.

    2)· Depends on your ADC.· If its data is serial, not so fast; if its data is parallel, fast enough (but maybe not fast enough for you.)

    Seems like speed is critical for you, so you'll have to go with an SX (which you can program using SX/B, SX-BASIC.)· When used with an external oscillator, you can be fast and precise indeed.· With its 4MHz internal oscillator, you can likely do your pulse trains, but you'll have to mess with values, somewhat, to get spot on.

    Post Edit: The SX-28, SX-48 protoboards are only $9.95 (they're practically giving them away.)· The SX ICs are inexpensive, << PBASIC ICs.· The only hurdle/investment is the SX-Key or SX-Blitz (the lower-cost alternative)·to program them with.


    Post Edited (PJ Allen) : 11/24/2006 4:35:28 PM GMT
  • whymaybewhymaybe Posts: 5
    edited 2006-11-26 03:26
    thanks a lot
Sign In or Register to comment.