Shop OBEX P1 Docs P2 Docs Learn Events
Proto Board — Parallax Forums

Proto Board

computer guycomputer guy Posts: 1,113
edited 2007-03-14 05:26 in Propeller 1
Hi

I have a few questions.

1. What would be the best way to mount a bread board and female pin header onto the proto board (e.g location)
like on the BOE?

2. How do you add a video out (TV) to the proto board.

3. If i use
FOR Pulses = 0 TO 199     'for 200 pulses
PULSOUT 12,625            'go forward at half speed
PULSOUT 13,750            'go straight
PAUSE 20
NEXT




on the BS2 what would i use on the propeller proto board.

Thank you smile.gif
«1

Comments

  • simonlsimonl Posts: 866
    edited 2007-03-05 13:30
    Answer to Q3:

    You could use the BS2Functions object and something like
    OBJ
      BS2 : "BS2Functions"
     
    PUB Pulses
      repeat until pulseCount = 199     'for 200 pulses
        BS2.PULSOUT( 12, 625  )          'go forward at half speed
        BS2.PULSOUT( 13, 750  )          'go straight
        BS2.PAUSE( 20 )
    


    NOTE: Just done that off the top of my head, so·check the syntax -- and the timing numbers are probably not right!

    HTH.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon

    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif

    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
  • Jasper_MJasper_M Posts: 222
    edited 2007-03-05 13:47
    simonl said...
    Answer to Q3:

    OBJ
      BS2 : "BS2Functions" 
    
      
    
    PUB Pulses
      repeat until pulseCount = 199     'for 200 pulses
        BS2.PULSOUT( 12, 625  )          'go forward at half speed
        BS2.PULSOUT( 13, 750  )          'go straight
        BS2.PAUSE( 20 ) 
    
    


    I've got no experience with BS or its compatibility functions, but I can say that this spin code is wrong.
    EDIT: repeat until pulseCount == 199 would literally repeat until pulseCount equals 199. However, pulsecount is never initialized to zero here. also, it is never incremented. the "from ... to" structure increments it automatically, until won't. Also, == is used for comparison, a single = is never used for anything.

    Following should work: (at least, compile and loop for 200 times)

    OBJ
      BS2 : "BS2Functions" 
    
      
    
    PUB Pulses | pulseCount
      repeat pulseCount from 0 to 199     'for 200 pulses
        BS2.PULSOUT( 12, 625  )          'go forward at half speed
        BS2.PULSOUT( 13, 750  )          'go straight
        BS2.PAUSE( 20 ) 
    
    
    

    Post Edited (Jasper_M) : 3/5/2007 1:55:40 PM GMT
  • simonlsimonl Posts: 866
    edited 2007-03-05 13:58
    Hi Jasper_M,

    Well, yes, that's another way to do it; especially as I missed the 'pulseCount' incrementer! Here's my way done better blush.gif

    OBJ
      BS2 : "BS2_Functions"
     
    PUB Pulses
     
      pulseCount := 0
    
      repeat until pulseCount == 199     'for 200 pulses
        BS2.PULSOUT( 12, 625  )          'go forward at half speed
        BS2.PULSOUT( 13, 750  )          'go straight
        BS2.PAUSE( 20 )
        pulseCount++
    

    That said, I think I like your way better, as it more closely resembles 'computer guy's' original code cool.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon

    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif

    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)

    Post Edited (simonl) : 3/5/2007 2:19:14 PM GMT
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-03-05 14:05
    ·Since we are demonstrating ways to do this, here's the minimalist approach with Spin for a 200 count loop:
    OBJ
      BS2 : "BS2Functions"
     
    PUB Pulses
     
      repeat 200                         'for 200 pulses
        BS2.PULSOUT( 12, 625  )          'go forward at half speed
        BS2.PULSOUT( 13, 750  )          'go straight
        BS2.PAUSE( 20 )
    
    

    -Martin


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    StampPlot - GUI and Plotting, and XBee Wireless Adapters
    Southern Illinois University Carbondale, Electronic Systems Technologies
  • Jasper_MJasper_M Posts: 222
    edited 2007-03-05 14:07
    Also, you forgot to define the pulseCount, like putting it after the function name and |.

    For the question about video connector, I'd suggest taking a look at the schematic for demoboard (downloadable from Parallax site). It's just like.. 3 or four resistors and the connector. If you're asking about the mechanical connection, ie. how to get the connector soldered to the protoboard, that's another thing. Most of the RCA connectors I've seen have very big pins that don't fit the standard veroboard holes. So you probably have to connect the RCA connectors with wire and then superglue/screw the connector to chassis/whatever you are building...
  • simonlsimonl Posts: 866
    edited 2007-03-05 14:10
    Jasper_M said...
    Also, you forgot to define the pulseCount, like putting it after the function name and |.
    Jasper_M: Well, I did say it was off the top of my head! You're correct of course).

    Martin: Why can I never remember KISS ?!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon

    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif

    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
  • parts-man73parts-man73 Posts: 830
    edited 2007-03-05 17:07
    Another comment about the RCA type video connection. see my comment in this thread http://forums.parallax.com/showthread.php?p=634772 complete with picture on how I mounted an RCA jack to a Protoboard. It's very sturdy/securely fastened, and looks good.

    Also, I never explained how the yellow wire is connected to the resistors. I stripped 1/2" of insulation from the wire. inserted it into the hole next to the leftmost resistor. Bent it over and soldered it to the tips of the resisters that protrude from the bottom of the board. Or you could just create one huge solder bridge.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian Meade

    "They who dream by day are cognizant of many things which escape those who dream only by night" - Edgar Poe

    Post Edited (parts-man73) : 3/5/2007 5:19:00 PM GMT
  • ForrestForrest Posts: 1,341
    edited 2007-03-05 17:15
    For mounting the video out resistors and connector - scroll down to the bottom of http://forums.parallax.com/showthread.php?p=634327 about the PRC-TVIO board
  • rokickirokicki Posts: 1,000
    edited 2007-03-05 19:25
    The current 5-pack of protoboards does not seem to have either a price or an "add to cart" button.

    Also the price on the protoboard is given in some places as $24.95 and others as $19.95.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-03-05 20:00
    The price of the Proto board is $19.95 until April 1st and which point it will be $24.95, the 5-pack page is mainly for after the price goes up since it is currently more expensive to purchase the 5 pack than buying 5 individual packs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • lostcauzlostcauz Posts: 36
    edited 2007-03-05 20:30
    I just noticed that I was charged $24.95 for a protoboard on one order then $19.95 on the next one a few days later.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-03-05 20:35
    We refunded the difference·to all those people which purchased at the higher price.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • lostcauzlostcauz Posts: 36
    edited 2007-03-05 20:45
    I see. By what method did you refund? My apologies but I don't see where I was refunded. It's no big deal, I just don't see it.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-03-05 20:55
    Credits were issued to the credit cards (it shows as a seperate item on your statement), you can email our sales manager jcarey@parallax.com with your name and order number and he can check the records for you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • lostcauzlostcauz Posts: 36
    edited 2007-03-05 20:58
    OK Thanks Paul.
  • computer guycomputer guy Posts: 1,113
    edited 2007-03-05 21:02
    Thank you smile.gif
    everyone.

    parts-man did you just glue it on the board or did you poke the big mounting pins through the large holes on the outside of the proto board.
    and if anyone could still answer my first question that would be great.

    Once again
    Thank you smile.gif all
  • computer guycomputer guy Posts: 1,113
    edited 2007-03-05 21:04
    parts-man an underside picture might be helpful. I get what you are doing but it just might be helpful in reproducing exactly what you have.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-03-05 21:13
    Computer guy, If you only need a small prototyping area, like on all our boards except the PDB, you can purchase it seperately and mount it overhanging like this:

    attachment.php?attachmentid=45726

    Place it where you want, flip·it·and the board·around, use a razor or xacto to score along the edge of the board and remove the adhesive backing for that part which is over the protoboard.

    If you are using the servos you can solder 1x4 SIP socket into the contol signal holes·for easier breadboarding.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 3/5/2007 9:17:39 PM GMT
    1024 x 768 - 150K
    11_2.JPG 150.3K
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-03-05 21:56
    I can see the book now:

    "101 proto-board projects"
  • computer guycomputer guy Posts: 1,113
    edited 2007-03-06 03:07
    That design looks good. hop.gifhop.gif
    Not sure about the bread board hanging off the side but a piece of perspex on the proto board hanging

    over with the bread board on top may look beter.



    I am asuming you are saying you could see a need of a book titled "101 proto-board projects"



    I would personaly like a book like this.



    Thank you smile.gif

    Post Edited (computer guy) : 3/7/2007 6:37:34 AM GMT
  • computer guycomputer guy Posts: 1,113
    edited 2007-03-06 07:05
    Hey parts man did you ever get that amp and audio jack on your board if so would love to see it.
    parts-man73 said...

    next I'm going to get a stereo jack on there and some small amps, and I'll have myself a poor-man's demo-board!

    Please note the quote was from this topic:
    http://forums.parallax.com/showthread.php?p=634772

    Thanks. smile.gif

    Post Edited (computer guy) : 3/6/2007 7:10:36 AM GMT
  • parts-man73parts-man73 Posts: 830
    edited 2007-03-06 14:40
    computer guy said...
    parts-man did you just glue it on the board or did you poke the big mounting pins through the large holes on the outside of the proto board.
    and if anyone could still answer my first question that would be great.

    I trimmed the big mounting pins with a dremel until they were small enough diameter to fit through the regular plated holes. Just be careful not to cut the pins right off. smilewinkgrin.gif then solder all pins to mechanically fasten the jack to the board. The larger mounting pins also function as the ground, so connect at least one of these to VSS. Then the center pin of the jack is connected to the junction of the 4 (or 3) resistor DAC.
    computer guy said...
    Hey parts man did you ever get that amp and audio jack on your board if so would love to see it.
    I ran into a problem, the Stereo headphone jack that I bought at the local electronics store wasn't as I had hoped. The pins don't fit into a 0.1" grid as nicely as the RCA jack did. Once I find one that does, I'll post pictures!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian Meade

    "They who dream by day are cognizant of many things which escape those who dream only by night" - Edgar Poe
  • computer guycomputer guy Posts: 1,113
    edited 2007-03-06 20:17
    can't wait to see your pictures.
    don't you hate it when parts don't fit. Why can't there be a standard that all electronics must fit a 0.1" grid.

    Thank you smile.gif
  • computer guycomputer guy Posts: 1,113
    edited 2007-03-11 08:28
    My servo jumps:

    i have tried servo32, servo4 and BS2_Functions.

    none of which seam to fix the problem.

    I have tried it with and without a 470 ohm resistor on the signal pin.

    470 ohm
    Prop---/\/\/\---servo
    |
    |-|
    +5v
    |Servo|
    -VSS
    |
    |

    Thank you smile.gif

    Post Edited (computer guy) : 3/11/2007 8:32:59 AM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-03-11 09:11
    I personally verified that the board can drive servos (I ran two simultaneously before authorizing it for production), so it's either program based or your power supply. Place a resistored LED on an output and blink it once before entering your servo stuff. Note whether you see it blink repeatedly or just once. If you see it blink repeatedly you are using an underpowered supply.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • computer guycomputer guy Posts: 1,113
    edited 2007-03-11 09:54
    I am using this code and the light blinks on and off five times and the servo turns about 5 degrees then there is a quick pause and the hole thing starts all over again.
    CON
        _clkmode = xtal1 + pll16x                           
        _xinfreq = 5_000_000                                'Note Clock Speed for your setup!!
    
      High = 1                         'A CONstant used to set an output port to about 3 volts
      Low  = 0                         'A CONstant used to set an output port to about 0 volts
      Out = %1                         'A CONstant used to set a port's direction to Out
    VAR
      Byte Pin                         'Declares Pin to be a global VARiable of a type Byte
    ' 
    OBJ
      BS2 : "BS2_Functions"
     
    PUB Start
      BlinkingLED                      'Calls the PRIvate procedure BlinkingLED
        BS2.PULSOUT( 8, 625  )          'go forward at half speed
    
    PRI BlinkingLED                    'A PRIvate procedure named BlinkingLED
      Pin := 4                        'Assigns 16 to the variable Pin                                      
      DirA[noparse][[/noparse]Pin] := Out                 'Makes port A16 an output port
      Repeat 5                         'Repeats the code indented under it 5 times
        'TURN THE LED ON AND OFF
        ' -- The LED, at port A16, is on for 1/2 second and off for 1/2 second.
        ' -- The System Counter increments by one for every System Clock pulse. Thus, if the
        '    System Clock is running at 80MHz, the System Counter will increment 80 million times
        '    in one second; and every counter increment will take 12.5ns (1/80MHz).
        '    Each WaitCnt statement below is set to cause a 1/2 second wait:
        '    40_000_000 counter increments * 12.5ns = 500ms (1/2 second)
    ' 
             OutA[noparse][[/noparse]Pin] := High         'LED ON                                      
             WaitCnt(40_000_000 + Cnt) 'ONE-HALF SECOND WAIT
             OutA[noparse][[/noparse]Pin] := Low          'LED OFF
             WaitCnt(40_000_000 + Cnt) 'ONE-HALF SECOND WAIT
    '
    'INDENTION IS IMPORTANT IN SPIN: There are no ENDIFs, END REPEATs, END SUB, etc.
    



    Thank you smile.gif
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-03-11 20:02
    The first thing I notice is that you program just ends, after the BS2.PULSOUT you·stop providing any instructions to execute. Put the pulsout in a repeat loop.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • computer guycomputer guy Posts: 1,113
    edited 2007-03-11 23:55
    I tried a different power suppy and now the light blinks five times and the servo moves a bit and then nothing.
    I think the power supply has fixed the problem i just need to fix the program to loop.

    can the propeller execute more than one commend at a time if so how many (in one cog).

    Thank you smile.gif
  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-12 00:14
    The Propeller can execute 8 different things (one per cog). There are some functions that take more than one cog to do (like high resolution VGA display output) and there are a few functions that can be combined in one cog. For example, the FullDuplexSerial object does high speed serial transmit and receive with one cog. The Servo32 object can control up to 32 servos with one cog.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-03-12 01:35
    Remember, a computer will do exactly what you tell it to do. If you stop telling it what to do, it does just that: stop. If you use an object such as servo32, it will start up a new cog and handle the continued pulses the servos expect.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.