Has anybody written a Windows application that downloads data to a BS2 EEPROM?
![davejames](https://forums.parallax.com/uploads/userpics/936/nZ2GD6713B1FA.jpg)
Hi All,
I'm almost afraid to ask this question for fear of not understanding the responses...but here goes...
I have a project that requires the user to input data, and then save the data out to the EEPROM which the program will use.
There're 3 ways I can see doing this:
1 - have the user modify DATA statements in the code with the desired values (I've done this but it exposes the program code to the user, not good)
2 - use a bunch of switches for the user to toggle that represents the desired values, the BS2 would read them and save the data to EEPROM (working on that right now, a little cumbersome but feasible)
3 - write up a stand alone Windows application that would allow the user to input the required data via a GUI and then write the data out to the EEPROM.
I like the idea of #2 because it doesn't require any external equipment, but the user might find it too cumbersome to use. I like the idea of #3 because it would look cool and it'd be easier for the user...but I have *absolutely* no clue on how to implement this type of solution. And that's where I was wondering if anyone has done this.
So, all that to say (in summation)....
I'm using a BS2 running PBASIC 2.5 and I have a need to develop a Windows application that will receive input from the user and then write the data out to the BS2 EEPROM. The BS2 has already been loaded with a program that will retrieve the data and put it to use. I have Visual Studio C++ v6.0 at hand to use for the development and will consider obtaining Visual Basic if it would help (or be easier on me).
Can anyone point me in the direction of my first stage of enlightenment?
Thanks much,
DJ
I'm almost afraid to ask this question for fear of not understanding the responses...but here goes...
I have a project that requires the user to input data, and then save the data out to the EEPROM which the program will use.
There're 3 ways I can see doing this:
1 - have the user modify DATA statements in the code with the desired values (I've done this but it exposes the program code to the user, not good)
2 - use a bunch of switches for the user to toggle that represents the desired values, the BS2 would read them and save the data to EEPROM (working on that right now, a little cumbersome but feasible)
3 - write up a stand alone Windows application that would allow the user to input the required data via a GUI and then write the data out to the EEPROM.
I like the idea of #2 because it doesn't require any external equipment, but the user might find it too cumbersome to use. I like the idea of #3 because it would look cool and it'd be easier for the user...but I have *absolutely* no clue on how to implement this type of solution. And that's where I was wondering if anyone has done this.
So, all that to say (in summation)....
I'm using a BS2 running PBASIC 2.5 and I have a need to develop a Windows application that will receive input from the user and then write the data out to the BS2 EEPROM. The BS2 has already been loaded with a program that will retrieve the data and put it to use. I have Visual Studio C++ v6.0 at hand to use for the development and will consider obtaining Visual Basic if it would help (or be easier on me).
Can anyone point me in the direction of my first stage of enlightenment?
Thanks much,
DJ
Comments
If you're familiar with PBASIC, there is a small learning curve for mastering SX/B, the BASIC variant used for programming SX chips. They have a built-in command set for both serial and I2C communications. Take a look at the MAX232 datasheets for hints on how to interface with the PC, and the EEPROM datasheet for hints on how to interface with that.
www.parallax.com/Portals/0/Downloads/docs/prod/oem/24LC128-v2.0.pdf
Take a look here for tips on getting started interfacing to the SX via the PC:
www.instructables.com/id/Control-real-world-devices-with-your-PC/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Paul
I agree with Paul in that option 3 seems the most professional and easier for an end-user. One downside is code overhead. Depending on the size of your program you may or may not have sufficient program space to create an interactive system. You would also need to handle when this code was run….For example, some systems on power-up look for an external key press to know if they need to go into configuration mode.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thanks much.
Shuffling back into the cave,
DJ
Jeff T.
The BASIC Stamp program would timeout if it got no response from the windows application allowing it to run normally. However, if it got a response, all the entered data would be downloaded at once and written to pre-determined EEPROM locations. This would actually take very little code space if done in this manner and if the BASIC Stamp were not responsible for generating the prompts for input directly, such as in text based (terminal).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Mr. Savage - your suggestion sounds intriguing...are there any resources at which you might point me?
I'll be conducting an out-of-state, customer class for the next 2 weeks so there will plenty of time for me to read through all the provided links during the evening hours in the hotel.
Thanks to you both,
DJ
Anything that uses VB to communicate serially with help you with that part of it. The main thing is to ACKnowledge messages from the BASIC Stamp so it knows the config program is listening. Otherwise just continue on with normal operation.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thanks for the direction.· I'll be busy readin'...
DJ
·