Shop OBEX P1 Docs P2 Docs Learn Events
PICs in BASIC vs SX/B / PBASIC - good story — Parallax Forums

PICs in BASIC vs SX/B / PBASIC - good story

T&E EngineerT&E Engineer Posts: 1,396
edited 2007-10-09 03:09 in General Discussion
I decided last week to just look at and try out·(not really abandon the great SX products) PICs in BASIC programming and see how they·compare to SX/B and PBASIC. I bought an EasyPIC 4 development board from a US distributor from MikroElektroniks - which also wrote MikroBasic for PIC. I also looked at Swordfish Basic (limited to 18F PICs only). I quickly found out how limited that PIC BASICs are. There are no READ / DATA statements and very limited on keyword statements. They did have some good libraries of external commands but I was not impressed and got lost easily trying to go through it all. I was not able to find any information about TRISA, TRISB ect. as I would expect some kind of reference to it since their example programs used it. Of course they had a flashing LED example program but no real lead in on how to get started and how to reference their very limited keyword command set. This is where Parallax shines in their reference help guides!

One forum member stated that MikroBasic for PIC is more like a "warmed up" Pascal with some C and far from any real BASIC that he (or I) grew up with.

SX/B and PBASIC is free and yes PIC basics like MikroBasic for PIC and Swordfish have free but·limited versions (full versions are $150).·Another PIC·Basic·I saw was $250. Well that was not going to happen!

With all of this said, I·am returning·everything (with no problems from the distributor) and going back to the great SX/B and PBASIC that I am comfortable with and find it is so much more complete than anything I found on the PIC.

I may still have a ways to go in learning more and more about the "growing" SX/B and PBASIC but it is much better than anything I found for the PIC in a BASIC language.

I'm back to stay!

Comments

  • JonnyMacJonnyMac Posts: 9,216
    edited 2007-10-06 13:27
    I, too, have been less than impressed with the PIC tools out there -- I just wish that there was an 8-pin SX as I have a commercial product design that needs one; will end up translating the assembly output from SX/B to PIC assembly (for a 12F675). I don't want to do that, but the board doesn't have the real-estate for an SX20 and I really need to keep the chip cost under a buck.
  • william chanwilliam chan Posts: 1,326
    edited 2007-10-06 13:35
    To further compare,

    How much is the cost of one comparable PIC chip with one SX28AC/DP?
    I noticed Digikey selling some 28 pin DIP PICs for only USD 0.65 each.

    I also heard that some recent PIC chips can now execute 1 instruction per cycle.
    Is it true?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-10-06 14:00
    From the limited amount of sites I have seen on PICs, I saw many between $2 to $12 or more with many of the popular ones being about $9. The SX chips are under $3. I just feel that the SX chips are much easier to work with which is probably due to all the great support and code examples from people like Bean, JonnyMac and others.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-10-07 08:05
    Regarding the 65 cent PIC, it is a genuine issue if you are into commercial production and don't need the additional speed or RAM that the SXes have. I still have a long way to go before that.

    But in terms of having learning and development working in harmony, the SXes really are the best value. I suspect that if I had commited entirely to PICs, I would still be struggling to grasp concepts and ideas that Parallax brings forth in a much more supportive educational environment.

    It really is about two different corporate attitudes - educational vs. industrial.

    Microchip and the PIC just expect you to have already gotten your P.E. in Electronics before you fool with them. On the other hand, Parallax is leading the pack in terms of providing a high quality knowledge base and community that helps you get going and keep going.

    There is a lot of unfinished software that is sold and never really finished. But, the vendor keeps grinding out ads and promises that the next version will come any day now. With PBasic, SX/B, and Spin, bugs just are not allowed to survive very long and new features are provided without costly updates.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-10-07 15:52
    A big consideration is how to program the chip once it's soldered in place. Using an SX, this is particularly easy using the crystal pins and the SX Key. You hardly have to design aroound the programming, save for possibly a jumper to disconnect the crystal. With a PIC it's a lot more complicated. You either have to use high-voltage programming or sacrifice a pin to enable low-voltage programming. In any event, programming is done through port pins that may not be connected conveniently for this purpose.

    An alternative that I've used in several designs where size is an issue and/or an A/D converter is needed is the Atmel AVR, specifically the ATTINY13. This is an 8-pin device available in an SOIC that has an internal 9.6MHz clock. It sells for $0.81 in hundreds. Although programming is done through three port pins, plus the reset pin, the serial algorithm is very simple. I use a BASIC Stamp to program these parts once they're on board, via a short cable and a spring-loaded test clip to grab the AVR from both sides. An AVR is nothing like a PIC or SX, though. The instruction set and architecture take some getting used to.

    -Phil
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-10-08 17:41
    JonnyMac said...
    I…[noparse][[/noparse]CUT] …will end up translating the assembly output from SX/B to PIC assembly (for a 12F675).

    JonnyMac,

    Do you plan to do this conversion entirely by hand, line by line or will you use some form of limited automation such as a utility that converts add, increments, rotations, and conditional tests, etc.?


    - Sparks
  • JonnyMacJonnyMac Posts: 9,216
    edited 2007-10-08 19:43
    I'll probably do it by hand -- it will be grueling, but I'll learn a lot in the process.
  • william chanwilliam chan Posts: 1,326
    edited 2007-10-09 02:12
    Is cost also the reason why Parallax uses PICs instead of the SX in the Serial LCD Displays products?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-10-09 02:30
    The Parallax serial LCD I have (rev. E serial board) uses an SX28.

    -Phil
  • BeanBean Posts: 8,129
    edited 2007-10-09 03:09
    Aside from being really off topic, all the Parallax serial LCDs I have use the SX28 also.

    And cost probably IS the reason Parallax uses the SX28 [noparse];)[/noparse]

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My goal is to live forever...Or die trying.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
Sign In or Register to comment.