Shop OBEX P1 Docs P2 Docs Learn Events
Here is my VB6 to Basic Stamp 2 "guide lights" prototype project! — Parallax Forums

Here is my VB6 to Basic Stamp 2 "guide lights" prototype project!

LittleTykeLittleTyke Posts: 34
edited 2007-09-04 07:25 in BASIC Stamp
Following all the very useful advice I have received from other members in this forum over the past week or so, I have now produced my first prototype to experiment with sending data from a VB6 program to a Basic Stamp 2. See my new web site at http://www.littletyke.myzen.co.uk/vb6tobasicstamp2/index.html

Many thanks for all your support!

Comments

  • LeWaltzLeWaltz Posts: 1
    edited 2007-09-02 15:34
    hihi

    this is william, and i am a newbie to programming... i am currently trying out VB6 and BASIC Stamp 2 too in a project...

    i wish to learn more about this 2 software, i went to your link too, thus i have this question in mind... you circuit board will send signal/data to the LED right? like from the VB6 form, when i run it, and if i select the number (eg: LED1), the circuit board will then light light the LED right? but using what component (i refering to your circuit borad which link to the LED? is it a microcontroller?

    and one more question... the BASIC Stamp is used to make sure there is communication between the computer and your LED circuit board right? when i use the BASIC Stamp, and type the letters a-h to switch off LED and also A-H to switch on LED correct? but how do i use BASIC Stamp and at the same time be shown in the VB6 when i run it? is it possible to show both BASIC Stamp terminal together with the VB6 form that you bhave created???

    sorry to asked so many things.. jus wanted to know more... thanks...

    will*
  • LittleTykeLittleTyke Posts: 34
    edited 2007-09-02 16:44
    The circuit board is a Parallax Super Carrier board with a Basic Stamp 2 microcontroller on it. I have connected a low-current LED via a 5K8 resistor to each of I/O pins 0 through 7, making eight LEDs in total.

    The Stamp 2 microcontroller runs the program shown on my web page. The VB6 program runs the other program shown on the same page. When I select one of the option buttons on the VB6 form, the code transmits a byte to the Stamp 2, whose program then determines which LED to light up.

    In the first program, the VB6 side sends a single character A through H or a through h. The uppercase character switches on the corresponding LED, e.g. "A" switches on LED0, "B" switches on LED1 etc, while the lowercase character switches its associated LED off.

    This is not the most elegant way of doing it! But I wanted to see something happening in this initial prototype.

    The second program is somewhat more sophisticated and uses Boolean logic working at the bit level to determine which LED to switch on. Thus I need only 4 bits in the byte that is sent from the VB6 program to the Stamp 2. Note that the Stamp 2 has to be running its second program to receive and respond to the data from VB6.
  • cyplesmacyplesma Posts: 76
    edited 2007-09-02 18:42
    very nice "whole" package, excellent job
  • LittleTykeLittleTyke Posts: 34
    edited 2007-09-03 05:34
    Thanks, cyplesma. Over the next few days I'm going to add further VB code examples to the web site. A question right now to the forum: Would you use a 74LS259 or a CMOS 4099 to fulfil the task of 8-bit addressable latch, all other things being equal? Both chips seem to do the same thing in this respect. I need eight of these to connect to the Stamp 2, plus a 74LS138 3-to-8 decoder chip to provide the WRITE DISABLE pulse to the selected latch.
  • LittleTykeLittleTyke Posts: 34
    edited 2007-09-03 16:46
    Can the Stamp 2 be interfaced to 74HC series ICs? These are "74HC Series High Speed CMOS TTL Devices with CMOS Compatible Inputs", according to the product catalogue.
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-09-03 17:17
    sure and Parallax sells them
    http://www.parallax.com/detail.asp?product_id=602-00010
    http://www.parallax.com/detail.asp?product_id=602-00009
    and they tell you how to use it
    http://www.parallax.com/dl/docs/books/sw/Web-SW-v2.1.pdf



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
  • LittleTykeLittleTyke Posts: 34
    edited 2007-09-04 07:25
    Thanks, TechnoRobbo. Suppose there are two alternative, functionally identical, chips available, 74LS138 and 74HC138, which is better to use with the Stamp 2, LS or HC? When I started dabbling (only dabbling, mind!) in electronics in the early 1970s, I don't think the "HC" range had been invented yet. I seem to recall only 74x00 series, 74LSx00 series and CMOS 4000 series. The main differences I can tell from the datasheets is that an "LS" variant has a fan-out of 20, whereas the "HC" has a fan-out of 10 TTL loads; and that the "HC" variant is faster. Would I get more "hassle" from using the "LS" variant as opposed to the "HC" one, or vice versa? It's not a question of cost, since all these ICs cost peanuts, but as an electronics virgin (practically - I just join the dots!) I want the solution that is as idiot-proof as poss!
Sign In or Register to comment.