Mr Billy
stechman
Posts: 11
My Project
I want to read a microchip from live stock (ear tag) and weigh the animal with an electronic scale that has a seriel port output at the same time and store the 2 readings in a datalogger I must be able to read up to 5000 animals. from the memory stick I must be able to update my data base of my stock progam.
My study :
I bought a Basic stamp 2 , development board, 125 khz RFID reader, datalogger and seriel LCD display.
I connected lcd on pin 10 rfid on pin 1 and 0 and I tried to program. I can read the Tag number on the basic stam software but I failed to program so that the code displays on the lcd display and stores in the datalogger . I tried to get ideas from the 2sx program but the programing is different .
I need help to save time
I want to read a microchip from live stock (ear tag) and weigh the animal with an electronic scale that has a seriel port output at the same time and store the 2 readings in a datalogger I must be able to read up to 5000 animals. from the memory stick I must be able to update my data base of my stock progam.
My study :
I bought a Basic stamp 2 , development board, 125 khz RFID reader, datalogger and seriel LCD display.
I connected lcd on pin 10 rfid on pin 1 and 0 and I tried to program. I can read the Tag number on the basic stam software but I failed to program so that the code displays on the lcd display and stores in the datalogger . I tried to get ideas from the 2sx program but the programing is different .
I need help to save time
Comments
Do you have a link to the scale's manual?
General advice:
Get the example programs for each of your devices and make sure each of them work. They're usually posted as links on the product webpage for each device.
It's much more useful to describe what happened, not just that your program didn't work.
Get the LCD working first. You can use that for debugging information along with the Stamp Editor's debug window.
Billy
If you have a scanner, perhaps you could scan the pages of the scales manual that deal with the format of the data and discusses how the scale decides to send the data. Remember that the scale uses RS232 voltages for the data and you need to have a resistor in the line from the scale to the Stamp's I/O pin to prevent the voltage from damaging the Stamp. Look in the Stamp Manual or the Stamp Editor's help files under the SEROUT statement for a discussion of this and a suggested hookup.
SERIN RX, T2400, [WAIT($0A), STR buf\10]
In the section Display_Tag, your program should properly be displaying the characters that were just read from the tag.
The last section, Animation, I have no idea what you are doing. It's all wrong. I suggest you throw all that out and start again, first by stating clearly what you want to accomplish in that part of the program. At that point in the program, the tag information is in buf, which is an array of 10 bytes.
Since the display holds two lines of 16 characters each, perhaps you should start simply by displaying the tag value on a single line with nothing else on that line, maybe with a title on the other display line.
Make sure to read the display documentation, particularly the table that describes what the various control characters do.
bill