Cannot program to eeprom.
alatnet
Posts: 80
in Propeller 1
Just got my prop chip and am having a bit of a problem trying to program the eeprom with it.
the propeller tool keeps saying verify failed.
eeprom is 24LC128.
Using an FTD1232 chinese adapter which does work in programming the propeller to ram fine though when trying the full duplex serial test 2 spin program it writes garbage to the terminal.
did a modified connection to be able to enable the reset pin for the propeller chip by using a 0.1uF capacitor and a 4.7k ohms resistor and connecting Rx to DTR.
The eeprom is connected correctly and have A0 to A2 set to ground and SCL and SDA have pullup resistors.
Any help is appreciated.
the propeller tool keeps saying verify failed.
eeprom is 24LC128.
Using an FTD1232 chinese adapter which does work in programming the propeller to ram fine though when trying the full duplex serial test 2 spin program it writes garbage to the terminal.
did a modified connection to be able to enable the reset pin for the propeller chip by using a 0.1uF capacitor and a 4.7k ohms resistor and connecting Rx to DTR.
The eeprom is connected correctly and have A0 to A2 set to ground and SCL and SDA have pullup resistors.
Any help is appreciated.
Comments
Usually the P1 is just using 32K out of the eeprom, Most boards have now 64K eeproms, the second half just usable by your own software.
I never used a 128K eeprom.
Do you have a crystal connected? On bootup the P1 runs RCFAST from an internal oscillator. That is not precise enough for serial communication since the internal oscillator varies from chip to chip.
I do not understand what you mean by 'and connecting Rx to DTR'.
Can you maybe post a picture of your setup?
Enjoy!
Mike
Mike
Red board is the FTD1232.
Using a 20Mhz crystal, at least I think it's 20Mhz. Says 20 on it.
i can use "xtal3+pll4" to set the clock mode to 80Mhz with a 20Mhz crystal.
It's also listed in the datasheet on page 14.
Though i dont have any other crystal atm, i did order 5Mhz crystals but it's going to take a while.
As for eeprom, i thought the eeprom chip in the datasheet was a 128. So that one is on me. Did find some 512's on ebay, which i bought.
Can probably use the 128 for extra storage or specific storage.
1) As @"Dave Hein" pointed out you need at least a 32Kb eeprom so 256Kbit not 128Kbit.
2) A 20Mhz Chrystal will not work at all. You need 5Mhz for standard configuration of 80Mhz operating clock on the P1. You can use 6Mhz for 96Mhz clock, but that is seldom needed and might not work on a bread board anyways.
3) you definitely need bypass capacitors on all power pins right next to the propeller chips power pins.
These capacitors are very important, I fried the PLL on my first P1 because I left them off, to eager to wait, wanted to see it running.
Parallax sells something called the PE-Kit, that is what I started with look for it in the Parallax shop and there you will find a basic minimal schematic for a bread board circuit. The PE Kit is some Starter pack with a assortment of resistors, leds, switches, all the stuff one need if one has nothing.
You do not need to buy the Kit, you just find the documentation on the product page. Not sure if Parallax still sells it but before I started buying complete boards I got a couple of them, they also sold just a small bag with propeller and all needed Parts for something like $15.
But be aware @alatnet that this forum and the Propeller are generally very addictive.
Enjoy!
Mike
https://www.parallax.com/sites/default/files/downloads/122-32305-PE-Kit-Labs-Fundamentals-Text-v1.2.pdf
Also, page 5 of the datasheet is pretty much the same as the one in the PE Kit manual that i found on page 27.
Though, im using the 3v3 power supply off of the FTD1232.
And it is missing the caps too. That's bad. You basically need capacitors on both power inputs of the prop and you need to connect both power inputs. Capacitor from power to ground about 10pf ceramic if I remember correctly. Like the crystal right next to the pins.
3.3V from FTD1232 is perfectly fine.
Most sample programs use a 5Mhz Crystal and are running at 80Mhz. With 6Mhz you can get to 96Mhz and some boards are using 10Mhz Crystals. But 5Mhz is most common and that is what most demo programs except.
Usually at the start of the main program you will find a line stating
this states that you have a 5Mhz Crystal and you want the PLL to multiply it by 16 to get 80 Mhz clock.
with a 10Mhz Crystal you would specify
to archive the standard 80Mhz clock
But a 20Mhz Crystal is simply to fast for a P1.
Enjoy!
Mike
-Phil
No!
The 3V3 output from the FD232R is only 50mA and is meant only for the 3V3 I/O drive of the FT232 itself and the pullup to the USB, and a bit extra.
Even driving a couple of LEDs with the Prop could exceed this! You are just asking for trouble!
Actually some of these FD232R boards convert the usb 5v to 3.3v using a separate regulator as a stand alone circuit and a set of links to select I/O and VCC voltage and make this available on the connecting pins along the edge of the board. This will run modest setups quite happily- I know I used that setup for a long time.
I think this is what he might be doing.
Dave
https://oshpark.com/shared_projects/2ivhHA2X
Haven't tested it yet as it would cost about $18 for 3 boards (lowest amount that they will manufacture).
Feel free to use it if you want.
Did a custom proploader config and still the same error.
Did verbose and it's saying: This is with the same setup that i have before.
It works fine with spin when trying to run it from the propeller ram, but not with simpleide at all...
Even tried rcfast and rcslow board types.
Here's my command line for trying to do this manually:
Both sets of power and ground pins connected with bypass caps on both pairs (for DIP40)?
Eeprom is 24C256 or 24C512? If not, what is it? And eeprom has bypass cap across power and ground?
3V3 regulator supplies sufficient power? As I said above, FT232R is likely insufficient. Regulator is properly bypassed on both input and output according to the regulator being used - see its specs.
If all the above ok, then try a simple program using PropTool?
Presume you are using the DTR transistor reset circuit?
Once this works, then we can go further.
yea, i saw that. Created a custom profile that uses XTAL3 and a 20MHz crystal but it still failed.
But the second stage bootloader might fail since practically all P1s are run at 80MHz or more, not 20MHz, and the software may not have enough time to write data to the hub before it misses the next character etc.
Also, there may be another aspect to this and that is the manner in which you have connected the 20MHz crystal. Crystal oscillator circuits are very sensitive to noise since they are effectively an inverted biased into the linear region as a high-gain amplifier (kinda). Those plug-in breadboards are notorious for poor connections and crosstalk and terminal capacitance although it looks like you did the right thing and cut the leads. Did you add those decoupling caps to the supply pins on both sides as required? Note, you may get away without caps when running RCFAST but certainly nothing is guaranteed when you switch to a a higher frequency and/or use multiple cogs.
EDIT: - Oh yeah, the most obvious after I looked at the photo of your setup. Even with caps it will fail since it seems you are using the 3.3V from the FTDI chip itself which will work when the P1 is only sipping power but as soon as you ramp it up it will fail. For a quick easy "3.3V" you can cheat and just connect two diodes in series from +5V. They can be signal diodes or plain old 1N4004 type diodes, it doesn't matter since they will drop around 700mV each. The voltage may be a little high but that should be ok. Best would be to use an actual 3.3 regulator.
So, im going to have to wait for my 5MHz crystals and capacitors then...
Well, i can still do some testing with spin and propeller tool and get used to that language.
Don't miss the EDIT I added to my last post, this was pointed out before it seems.
Do you have an updated photo - with a clear view of the crystal? And a link to the USB serial module you are using?
Edit: I do have some 3v3 1W zener diodes.
Edit2: here's what it says on the crystal:
https://www.ebay.com/itm/2Pcs-LM1117T-5-0-Nsc-Reg-Ldo-5-0V-0-8A-TO220-ik/262950354293?ssPageName=STRK:MEBIDX:IT&_trksid=p2057872.m2749.l2649
https://www.ebay.com/itm/2Pcs-LD1117V33-Linear-Voltage-Regulator-3-3V-800Ma-TO-220-in/262863950313?ssPageName=STRK:MEBIDX:IT&_trksid=p2057872.m2749.l2649
To which i'll be making a power board.
BTW - even tiny SOT89 regs can handle 800ma, it all depends upon the input voltage and power dissipation.
If you are making a power board then you may as well make a board for the Prop and do it "Prop'erly".
However, even if you only want to prototype you can use the cheap double-side plated through-hole matrix board like this or something similar.
You basically want matrix board that is tinned and plated through double-sided with individual pads. If you need to join up pads then it is just a case of bending a component lead or solder blobing or even stripping the insulation off some Kynar wire to for a bus or ground etc. So much easier and cleaner than cutting tracks. The tinned pads are also great for surface mount components like 0805 caps and resistors and LEDs etc.
Edit: Also, for the TO220's, using them cus i can use them on a breadboard.
Oh, the humanity!
If this was the 70's and you had a bunch of transistors then this type of stuff was what you used, that or tag strips. There wasn't much choice. But I can assure you that once you use proper stuff you will never ever want to even see that stripboard stuff ever again. Besides, that stuff would deform and tracks would lift and you had to make a really clean cut or the copper bits would short, and it's not even tinned. The list goes on.
Here's a sample of a prototype using quality matrix board.