Enter ZIP
donde
Posts: 51
I'm very new to Prop, but have managed to get "Weather Internet Display", July, pg 15, Circuit Cellar, working OK on Propeller Demo Board, along with a W5100 Ethernet module. Getting WeatherBug data is based on entering your ZIP code into the program before compile. Then, weather for the ZIP shows up on screen. I can do this manually right now before loading Prop Tool. But, I want to do this interactively without plugging in PC
Coming in mail, is a programmed PIC to encode a common bus keypad. The circuit puts out 9600 baud serial ASCII data when a key is pressed. I have already played a demo serial program by Stefan, and I can see serial coming out from a string "Hello World". But I need to go the other way: RX data from the PIC. Right now the ZIP info is not in Main, so probably have to move it there where it loops, so it can ask for the ZIP, just once. To put in another ZIP, I would hit reset. I have no idea if loading EEPROM can be interrupted to input data and then continue to compile.
Probably my logic is not correct.
I guess I need to get some focus from someone on how to do all this!
Don
Coming in mail, is a programmed PIC to encode a common bus keypad. The circuit puts out 9600 baud serial ASCII data when a key is pressed. I have already played a demo serial program by Stefan, and I can see serial coming out from a string "Hello World". But I need to go the other way: RX data from the PIC. Right now the ZIP info is not in Main, so probably have to move it there where it loops, so it can ask for the ZIP, just once. To put in another ZIP, I would hit reset. I have no idea if loading EEPROM can be interrupted to input data and then continue to compile.
Probably my logic is not correct.
I guess I need to get some focus from someone on how to do all this!
Don
Comments
BTW, for anybody else who reads this the link to code is here: ftp://ftp.circuitcellar.com/pub/Circuit_Cellar/2009/228/Nickels-228.zip
2) You either have to compile the data into your program and download it or you have to write part of your program so it gets the data if it's not already there, then stores it in EEPROM.
3) You can use something like FullDuplexSerialPlus from the Object Exchange to read data from a serial input line and either store it as a string (really a byte array) or convert the data to an integer. Look at the demo program included with FullDuplexSerialPlus.
4) You can use something like Basic_I2C_Driver or any of several other I2C drivers in the Object Exchange to write one or more bytes to an otherwise unused portion of the EEPROM (and to read the bytes from there). This will remain untouched as long as you don't download a new program to the EEPROM. It gets erased to zeroes on a download. The Propeller Tool can show you how much EEPROM space your program uses (F8 key). The rest is available for this sort of data storage.
Btw, the need to remember the zip data seems like a good use for the eeprom storage methods recently discussed here...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Agent420) : 8/20/2009 7:32:24 PM GMT
Well, I found the 3 memory locations where the 5 digit ZIP resides. All 3 ZIP's would be replaced to show new weather.
1st one is at: 007C thru 0080
2nd one is at: 0016 thru 011A
3rd one is at: 01A6 thru 01AA
Again, I want to send the 5 number (ZIP) into these 3 locations. Want to use a programmed PIC that puts out 9600 baud ASCII with a keypress. Still not sure of next coding step.
Don
PS: I'm glad that you noticed there was more that one place where the zip was. I only noticed one.