Shop OBEX P1 Docs P2 Docs Learn Events
Use Basic Stamp to read output from Pic — Parallax Forums

Use Basic Stamp to read output from Pic

LWLW Posts: 8
edited 2010-03-13 16:10 in BASIC Stamp
Basic Stamp Project.
Help and guidance needed.
Hi I’m very new to the Basic Stamp microcontroller and have a specific need to build a project if anyone feels they could offer any help or advice for a first time user i would be extremely greatfull.
I have several (over 20) hand held pieces of electrical test equipment that were built in china and the company does not exist anymore. These units plug into a master unit and communicates data etc. Each of the hand held units have a PIC 12f629 microcontroller, this only stores the handheld units Unique id code, and communicates via a three wire connector, a=12v +,b = -,C=unique id data.

I believe the the unique ID code For each hand held unit is 4 Numbers written in hex

The main data from the hand held unit is transferred via another connector

I have swapped pics from one hand held unit to another and it just transfers the unique id not the data
The Printed circuit board in the hand held units have a small switch that allows a new unique id code to be loaded . I have tried reading the Pic using a Willem programmer but the code and data is locked. I want to be able to do Two very simple things.
I intend to use a Basic stamp with a Serial digital read out Parralax 20 pin stamp (green board)
Task 1) Just read the unique ID code from the hand held unit and display it on the stamp display.
Task 2) Enter a new code via switches or keyboard on the stamp and then sent it to the hand held terminal

Post Edited (LW) : 3/13/2010 12:17:48 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-03-13 16:10
    1) Possible. You first need to use an oscilloscope to verify the voltage levels being used. They could be +5V logic levels or they could be RS-232 logic levels and you need to know which before you try to connect a Stamp. You also need to know the data transmission speed (Baud). Once you figure out what's needed between the hand held units and the Stamp and the Baud, you can write some small programs to try to figure out the format of the data. Read the "BASIC Stamp Syntax and Reference Manual" chapters on the SERIN and DEBUG statements. The data could be sent as 4 characters containing the hex values in human readable form ("0"-"9","A"-"F") or it might be sent as two bytes, each containing 8 bits. There might be delimiting characters as well like spaces or carriage return codes.

    2) Much more difficult. Do you have any idea how the new unique id code is presented to the device? It may be that, when the small switch is set, you send a new code to the device in exactly the same way it's received from the device. If not, you may never figure this out.
Sign In or Register to comment.