Shop OBEX P1 Docs P2 Docs Learn Events
Role of Transisor in the Basic stamp 2 chips — Parallax Forums

Role of Transisor in the Basic stamp 2 chips

AravindAravind Posts: 3
edited 2007-06-12 06:41 in Learn with BlocklyProp
Hi,

I am wanting to make a home board using PIC16C57C-20/P, I have tried the circuit as indicated in the Schematic given in the parallax site for BS2OEM schematic, I had made the circuit on the breadboard except for the Brown out Detector, When ever I tried to download program in the PIC it is not doing, please tell why it is happening and also tell how the RS232 Logic is being converted into TTL logic in BS2 and also how the PIC16C57C is put into ICSP mode.

Aravind kumar singh

Comments

  • ForrestForrest Posts: 1,341
    edited 2007-06-02 11:52
    Have you purchased the BS2 Interpreter chip from Parallax www.parallax.com/detail.asp?product_id=PBASIC2C/P or are you trying to use a unprogrammed Microchip PIC16C57C-20/P? The difference is the BS2 Interpreter chip is PROGRAMMED at Parallax and once it's programmed, it is NEVER reprogrammed afterwards. A BS2 program actually resides in the 26LC16B EEPROM and the BS2 Interpreter fetches PBASIC stamp tokens from the EEPROM and executes them when a program is run.
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-06-02 20:13
    Yup, sorry, Aravind, but the PIC16C57C you get from Parallax has the PBasic run-time environment programmed in. And that's where the ICSP code resides. Sadly, this is Parallax proprietary (that's where they make their money to publish all this cool stuff, after all).

    But they're not completely heartless. They will sell you a PIC16C57 WITH the PBasic runtime environment programmed in -- that's the "OEM PIC" processor they have on their website.

    To jumpstart your efforts, it might be good for you to purchase the OEM Kit from Parallax. This will have all the necessary parts -- and you can then find other sources for the non-Parallax parts if you want to make a lot of them.

    But yes, an off-the-shelf PIC16C57 won't have the runtime code programmed into it.
  • AravindAravind Posts: 3
    edited 2007-06-04 05:22
    Thanks people for your replies. Well i have the OEM PIC16C57 which is imported from the Parallax. Well i am working to make my own board, but still is not clear how the Transistor in the Main Development board is working. how it is converting the RS232 Logic to TTL logic...............?

    And what are the pins from the DB9 cable required to download the program form the Pc to the Chip using serial port....?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-06-04 15:31
    The Basic Stamp manual (if you don't already have it) is downloadable from the Parallax website (under menu Downloads / Documentation). That has the schematics of all the Stamps and includes the DB9 connections. RS232 involves signals that can normally range from -12V to +12V with the -12V being the idle or logic true ("mark") state. The PIC requires inputs in the range 0 to 5V and the idle state for serial input is +5V. The logic false state for serial input is 0V. The transistor circuits convert the one voltage / polarity standard to the other and are absolutely necessary (or you can use a special purpose IC like a MAX232 or equivalent). If you connect an RS232 signal to a PIC directly, you will destroy it.
  • ForrestForrest Posts: 1,341
    edited 2007-06-04 16:23
    Note you can only communicate between the PC serial port and the BS2 Interpreter chip - you CAN'T program the chip. BASIC programs are stored in the 24LC16B EEPROM chip.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-06-04 17:27
    The communication is always between the PC and the interpreter chip. The interpreter does the programming of the EEPROM through commands sent from the Stamp editor during the downloading process. The Stamp editor resets the interpreter chip by toggling the DTR line (part of the serial connection). During the initialization of the interpreter, it (the interpreter) checks the serial port for the presence of the editor (they exchange some known data). If the editor is present, the interpreter waits for a command, one of which is to download a PBasic program in a compiled form and write it to the EEPROM as it is received. Once the download is completed, the interpreter will start to interpret the program in the EEPROM. If there is no Stamp editor present, the interpreter starts whatever program is already in the EEPROM.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-04 17:54
    I would recommend checking very carefully the schematic for the BS2-OEM. If you would like to know exactly how the Interpreter communicates with the BASIC Stamp Editor on the PC, you should download the Tokenizer Library which contains a PDF document that explains this in detail. There are a few more steps which are affected by the proper signals being present on these lines at the right times. So timing can also be an issue. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • AravindAravind Posts: 3
    edited 2007-06-12 06:41
    Thanks to everybody for their valuable comments and guidance given
Sign In or Register to comment.