Shop OBEX P1 Docs P2 Docs Learn Events
BeMicroCV EEPROM Modification, Peripheral Pin Selection — Parallax Forums

BeMicroCV EEPROM Modification, Peripheral Pin Selection

65816581 Posts: 132
edited 2014-10-10 12:53 in Propeller 1
Hi,

I just wanted to let you know that I replaced the on-board 512 byte EEPROM with an
24LC512 512K EEPROM (to be suited for the P1V + user code) and re-mapped P28/P29
in the Pin Mapping file to use the on-board EEPROM.

I am currently working on some switch-logic which will boot from the EEPROM and then
allow to re-route the P28/P29 back to the I/O header.

Furthermore I am thinking like PPS done in the ZPUino to allow us to rewire the I/O
pins dynamically: http://www.alvie.com/zpuino/pps.html

attachment.php?attachmentid=111344
Here you see where the original 512 byte eeprom was (after I desoldered it).

bemicro_mod.jpg
600 x 342 - 133K
«1

Comments

  • jac_goudsmitjac_goudsmit Posts: 418
    edited 2014-10-09 12:54
    This is a great idea, and I was thinking of doing the same. However I don't have an SMD version of a 24LC512 so I haven't gotten to it yet. Maybe I'll dead-bug a PDIP EEPROM on the top side (TP7 and TP8 are the I2C lines, and 3.3V and ground should be easy to find); that way I can keep the board on my desk "right side up" so I can see the LEDs too.

    I'm also thinking of putting an alternative boot loader in the ROM for those who don't want to do the soldering and just want to use the Spin tool to download a small image. The alternative boot loader would pretend to accept 32K from the Propeller tool but only store the amount of bytes that the EEPROM can hold. I think the original EEPROM is 2KB (not 512 bytes) so it should be enough to fill with one cog worth of code and data, maybe to run a chain boot loader to boot from the SD card. Obviously there's no room for a file system in 2KB but it might be possible to think of alternatives; maybe a "boot partition" that contains a second-stage boot program which in turn loads a boot program from the main fat32 partition...

    ===Jac

    By the way, the 24LC512 is 512 Kb (kilobits) which is 64KB (KiloBytes).
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-10-09 18:38
    6581 wrote: »
    Hi,

    I just wanted to let you know that I replaced the on-board 512 byte EEPROM with an
    24LC512 512K EEPROM (to be suited for the P1V + user code) and re-mapped P28/P29
    in the Pin Mapping file to use the on-board EEPROM.

    I am currently working on some switch-logic which will boot from the EEPROM and then
    allow to re-route the P28/P29 back to the I/O header.

    Furthermore I am thinking like PPS done in the ZPUino to allow us to rewire the I/O
    pins dynamically: http://www.alvie.com/zpuino/pps.html
    Here you see where the original 512 byte eeprom was (after I desoldered it).

    I haven't played with my CVs (scopes) yet but I will swap it out with at least a 512 or maybe the 1Mbit devices and let you know. I will just have to redirect to these pins.
  • TubularTubular Posts: 4,702
    edited 2014-10-09 19:14
    A great idea, 6581. Well done
  • pik33pik33 Posts: 2,366
    edited 2014-10-09 21:40
    The de2-115 has eeprom on its down size and can be modded the same way.
  • 65816581 Posts: 132
    edited 2014-10-10 00:30
    @pik33: If you will be writing an alternative bootlader: Maybe you could implement a bootloader which does following:
    - On RESET wait n cycles
    - If during that cycles we receive something from the UART -> serial programming mode
    - If not, try to boot 'boot.bin' from SD
    - If failed, of file not found try to boot from SD
    - If all fails, go to some kind of fail image, which sowas an LED pattern, that there's something wrong or so
  • pik33pik33 Posts: 2,366
    edited 2014-10-10 01:02
    At now, the advanced bootloader like this is not needed for p1v.

    Case 1: you have an sufficient size eeprom onboard. So, you can program the eeprom which then can boot from SD - this is done and available in OBEX.
    Case 2: you have no eeprom. Then you can use modified bootloader which starts from p1v RAM and hard programmed fpga board. Then it can start a system from its ram and then eventually boot from SD or something, like onboard flash.

    For silicon P1+ SD boot loader will be good thing, but now we wven don't know if P1+ will be a real chip.
  • jac_goudsmitjac_goudsmit Posts: 418
    edited 2014-10-10 12:53
    I think it should be possible to make future alternate bootloaders possible by checking P28/P29 for the usual 100k pullup resistors. If they're there, the boot loader can start from EEPROM, otherwise it can do something else, e.g. boot from SD card. Multiple combinations of HIGH and LOW pins P28/P29 can be used to tell the boot loader where the SD card is attached...

    So many ideas, so little time :-)

    ===Jac
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-08-10 08:13
    Now that I have a P1v working on my BeMicroCV, this seems to be an obvious next step. One can only get so far with binaries downloaded to RAM.

    Has anyone made any progress with this since Oct 2014.
  • No replies....
    I guess I should move ahead on my own.

    My situation is that I have EEPROMs for the Propeller 1 in DIP packages, not surface mount. So it seems that I should build a tiny plug-in daughter board to prove the feasibilty of the concept of loading binaries to EEProm and then booting from the same.

    Later...
    after that is working, the modifications to the BeMicroCV board and the related code can come about.

    That seems wisest as I hate to hack into the board without a solution I am confident of.
  • mindrobotsmindrobots Posts: 6,506
    edited 2015-08-11 13:03
    Loopy,

    I just pulled off pin 28 & 29 from the P1V and connected it to a DIP EEPROM. I made an add-on board with a number of other items on it. I'll see if I can find pictures or a link. You can see the EEPROM sitting in the upper right corner of the add-on board. It all worked just like a Propeller.

    Once I have the P1V image loaded, I just treat the FPGA board like a strangely shaped Propeller or Propeller Dev board! I haven't hacked any FPGA boards yet.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-08-25 16:09
    As usual, Forth is my main goal, here it is to explore the P1v in Forth. Happy to hear you are interested in getting an EEPROM boot.

    pfth Forth 1.03 created a whole SDcard file system with tiny editor called SPINIX. I believe that manages a boot from SDcard, but I think the EEPROM is still a required part of the boot. It may be overly complex to provide a boot without the EEPROM being involved. Code would have to be written somehow to be included in the Verilog files.

    I ran the initial download test that blinks the 8 LEDs on my BeMicroCV after installing the P1v, but it would be nice to have a persistent binary that automatically loads whenever I power up.

    Using the SDcard may be possible (It certain is from within Forth), but it is much larger development project than just getting an EEPROM to store and boot a binary.

    And if this works with the BeMicroCV, it should also work with the BeMicroCVA9. So far I am saving my CVA9 while I learn... just in case I actually do something drastically stupid.
  • Cluso99Cluso99 Posts: 18,069
    Making a new ROM for the P1V is not difficult - I have done this.
    However, there are a number of steps that have to be followed.
    If you want a new ROM I can do it for anyone - You will need a set of files that compile correctly to replace the booter. I can add the spin interpreter (standard or my faster version) and the other parts if required.
  • Okay....
    1. I have located pins 28 and 29 on the BeMicroCV, and nearby 3.3VDC and Gnd. I still need to build the daughter board

    2. Jac Goulsmit seems to have provided Booter code that might be modified.

    3. The Spin Interpreter appears to remain the same.

    +++
    That doesn't seem that difficult. I just have to get that daughter board built and figure out how to share GND with the PropPlug.

    ===
    After that works, it would seem that the actual modifications of replacing the BeMicroCV EEPROM with larger and diverting (or sharing perhaps) Pin 28 and 29 to the on-board device should be obvious.

    ===
    This is not going to get done quickly by me as I am having OS problems that are forcing me to do a lot of Admin housekeeping, but one can at least read and try to see how to modifiy Jac Goudsmit's Booter code file.
  • Cluso99Cluso99 Posts: 18,069
    Loopy,
    When you get around to it, let me know. There are a lot of gotchas in getting the format right for Altera. Fortunately ozpropdev did a nice program that allows the binary rom code to be easily placed into the correct location and spit out in the correct format. It's not simple until you know how.I began by writing my own spin code to reformat but that isn't required now. But, it may be Windoze sw based.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-08-13 10:26
    Well, I Googled 'Jac Goudsmit Github' and found he has quite a few projects not related to this one.

    Look to the Download button in the files listed under P8X32A_Emulation for useful files. NOTE -- These are all for Altera FPGAs.

    Use this link below or he has provided other GitHub Download links that only provide the CV and CVA9 files, that include the PNut Booter source in a .spin file

    https://github.com/jacgoudsmit/P8X32A_Emulation

    Most importantly, in his P8X32A projects is a very nice repository of all his various code that can be downloaded --- INCLUDING the .spin code for Boot program (needed as a starting point for modification) and .spin code for the Compiler. While they are .spin files, the actual code seems to be PASM

    ++++++++++

    After that, the placement of the binary certainly is an issue. It is nice to know that resources and help are available. One can do ANYTHING in FPGAs, so there are lots of odd ball details to deal with, and traps to avoid that come along with the flexibility.

    I simply want to add the following

    1. First, test to see if the EEPROM is live, and attempt to load and start the Propeller from an EEPROM binary.
    2. Second, if there is Reset activity, try to allow the Serial Port to takeover and reload RAM and boot or overwrite the EEPROM and boot as selected.

    This is all pretty much a duplication of what the physical Propeller 8X32a does already. Parallax has just preferred not to provide their in-house code.

    ++++++++++
    As far as the daughter board for the DIP EEPROM, I think I have worked out how it can share the ground pin with the Prop Plug.... it is not a big deal.

    Getting started with Quartus II as set off an avalanche of neglected ADMIN activities on my Quad 64bit computer. It is embarrassing how much mess and neglect I have accumulated. But the FPGAs are motivating me to clean up.
  • Loopy, the stock P1V, as built from Jac's P1V repository does #1 and #2. It uses an EEPROM connected to pins 28/29 just like a silicon P1.

    The P8X32 repo is pretty much a dead repo. It is a fork of the original Parallax code but isn't being worked on or added to and doesn't have any plans to be worked at least by Jac or myself. The structure of the P1V repo is much more flexible when it comes to supporting multiply FPGA boards and vendors.

    The Spin code in Jac's repo is essentially what is put into the P1V RIM when you create an image. The P1 ROM is in the two .hex files and Quartus puts those into the image.

    Honest, a P1V works identically to a real P1....really!
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-08-13 10:06
    Mindrobots,
    So you are saying that I should just build the daughterboard with EEPROM and try it with what I already have loading in the BeMicroCV. I may have loaded good code and just have it behaving in the normal fashion for a device that is lacking an EEPROM

    That certainly is appealing,.......... and much easier.

    I can then first work out the physical interface of the SDcard pinouts in Verilog, modify the pfth Forth source files, and try in Forth with the SDcard.

    +++++++
    I should dig out the soldering iron and the EEPROM asap.

    Later and after I import a surface mount EEPROM (not available locally, arrgh....), I can reassign the Pins to the on-board device.
  • Cluso99Cluso99 Posts: 18,069
    Loopy, Parallax released all the ROM source code years ago. Anything you need, just ask.
    Its the PropTool source that has not been released.
  • Yup, exactly what I am saying. Same thing I said a few posts back when I provided a link to a thread at Propellerpowered showing my BeMicro CV with an add-on board. The add-on board provides EEPROM, SD, KBD, VGA, etc. that plugs onto a CV just like the CV is a real (but funny shaped) Propeller.

    It's really that simple with the stock P1V, no tricks, no funny stuff, just a P1 in a different package. The only difference in ROM is the BeMicro CV version doesn't the SIN tables and the built in fonts due to space limitations. It boots and runs JUST LIKE A REAL P1.

    Fire up the soldering iron and get some real work done!

    Making changes to the onboard EEPROM is just a convenience. It is NOT a needed step to get some EEPROM connected to a P1V
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-08-13 10:27
    I just took a look at the PNut Booter .spin file and the first 3 or 4 lines confirm exactly what you say.

    I have just been working through steps assuming that I had to do more work than really is required. This thread started long ago and I had to catch up with current status of resources.

    Thanks..
  • jac_goudsmitjac_goudsmit Posts: 418
    edited 2015-08-13 20:48
    Well, I Googled 'Jac Goudsmit Github' and found he has quite a few projects not related to this one.

    Look to the Download button in the files listed under P8X32A_Emulation for useful files. NOTE -- These are all for Altera FPGAs.

    Hi Loopy,

    The P8X32A_Emulation repository is the old one that was based on the work of Heater and MindRobots. I don't work on it anymore but it has some useful stuff in it, such as the Xilinx port and the decrypted binaries.

    When Parallax started their own Github group, they put their original sources online and I forked that to another repo at https://github.com/jacgoudsmit/P1V (unfortunately Parallax still hasn't picked up my pull request with bug fixes, so now the Main branch of that repo has been abandoned until they do). Unfortunately the P1V repo doesn't show on my front page, you have to click on "Repositories". I have no control over the list of "Popular Repositories". The P1V repo is the one I'm maintaining, and it has some catching up to do with what was in the old P8X32A_Emulation repo.

    I did replace the EEPROM on my BeMicroCV (I seem to remember taking pictures but I don't know where I posted them: here or Twitter or Google+ or elsewhere). All I did to make it work is to add the EEPROM_SCL and EEPROM_SDA pins to the project file and connect P28 and P29 to them. I didn't make any changes to the boot loader, the original boot loader can load and save programs to the EEPROM just fine, the chip just has to be big enough and on the original board, it isn't. The same goes for the BeMicroCVA9 but there too, it's easily remedied if you have a soldering iron with a small tip and a steady hand.
    This is all pretty much a duplication of what the physical Propeller 8X32a does already. Parallax has just preferred not to provide their in-house code.

    As others already said, the P1V does exactly what the P1 chip does. I didn't make any changes to the boot loader, though the old repo makes it possible to store unencrypted code (I still have to merge this to the P1V repo), which also makes it possible to write your own alternative boot loader, e.g. to load a program from SD card, which should be interesting for those who want to store their program persistently but aren't interested (or allowed) to solder another EEPROM on the board. I'm planning on involving the DIP switches with that, so it's possible to switch the boot method without having to reflash the FPGA.
    As far as the daughter board for the DIP EEPROM, I think I have worked out how it can share the ground pin with the Prop Plug.... it is not a big deal.

    I want to do a daughter board with an EEPROM, an FTDI chip and a QuickStart header (maybe two, for port B ). I'm thinking I can probably design such a board and make it work for both the BeMicroCV and the BeMicroCVA9 even though their pin headers are incompatible.

    ===Jac
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-08-14 08:26
    Jac Goudsmit,
    Thank you for the clarifications about the state of both your own and Parallax's repositories for the P1V. It is important for new users to understand that the Parallax code for the CV doesn't load properly and is not being actively maintained. We all rely on your code.

    It is obvious I have been bouncing around in searches and trying to catch up as most of the interest in FPGAs and P1V blossomed in 2014 and then slowed for awhile.

    We seem to have new interest (certainly in my own case) as the BeMicroCVA9 became affordable and Altera decided to provide software for programing in their FREE Web version of Quartus II V15.0.x.xxx

    (The BeMicroCVA9 is now $150USD, and the BeMicroCV is now $49USD from Arrow Electronics.)

    +++++++
    For me personally, your work has made it far easier to catch up and get started. Learning a new and complicated IDE such as Quartus is made much easier by having a project with good working code that can go from start to finish thorough the compile and load sequence.

    That is about as far as I have gotten so far.

    It is the start of the weekend here, and I hope to solder up a small DIY daughter board for the BeMicroCV that will include just the EEPROM and PropPlug interface.

    I have no ambitions to develop or use a Quickstart interface as some of the Propeller i/o is already distributed to push buttons, LEDs, and the SDcard. But a Quickstart interface might appeal to others that actually have used it extensively. This is just my personal preference, and I might change my mind. I certainly would consider buying a board from you as a way of expressing my gratitude for your efforts.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-08-14 13:37
    Good news...
    I soldered up my DIY daughter board for the 24LC256 (or larger) 8 pin DIP EEPROM.

    Past experiences indicate that I should take a rest break, check the continuity of everything tomorrow before actually attempting to use it. But it is built and I will try to get some photos posted along with confirming success.

    The same board includes a plug in for the PropPlug as they share the same GND pin on the BeMicroCV.

  • Attached is a photo of the BeMicroCV with the EEPROM daughter board attached. No eepron plugged in yet. Must buy one tomorrow.
    1836 x 3264 - 653K
  • Now you're cookin'!!!
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-08-14 20:13
    Poking around on the internet for 24LC512 or 24LC1024 chips in an SMD, and trying to save on shipping. If I must, I will add in a bunch of 4x and 8x level shifter mini boards or chips to dillute the impact of FedEx, DHL, or UPS (the Duhl-Fed-UP oligarchy)

    The thing is that I see variants 24Cxxxx, 24LCxxxx, 24FCxxxx, and 24AAxxxx.

    It seems the 24Cxxxx are old power hogs that should be avoided, but the FC and AA just go lower in their operating voltage than the LC (maybe cost more, but will do fine.

    Am I correct? Who should I order from? Mouser, Digikey, Farnell, Arrow, Futurlec (nope, no level shifters), SparkFun, or ???.

    Gawd, I just hate to spend $100USD to get a $3.00 part. I need help. So far, Digikey will sell me me 5 24LC512 chips for a total cost of $40USD.

    It seems the 1024bit and 2048bit I2C EEPROMs are disappearing due to lack of demand.
  • Cluso99Cluso99 Posts: 18,069
    Loopy, if you can wait I will see if I have any dip 24c512 at home. I can post to you if I have any.
    I share you problem with excessive shipping costs. I am just working up Orders from 3 U.S. Suppliers to be combined with props waiting for me to be consolidated and shipped to me. But I have to wait as one part is on back order and due shortly.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-08-15 08:53
    Cluso99,
    I went downtown today and purchased three 24lc256 in DIP that will do for now. Those appear to be 50% of all the existing inventory in Kaohsiung --- no 24lc512 or larger. Microchip claims the 24lc1024 are in production, but will only provide 5K component reels.

    For later, I need the SMD versions to solder to my BeMicroCV and BeMicroCVA9. And it makes far more sense to get the largest ones possible, such as 24lc1024 (or 1025 or 1026). I can also use FC or AA instead of LC.
    +++++++++++++++

    I certainly can wait for the SMD parts, three or more.

    And even if the shipping cost were to be the same, I'd rather pay you to mail me something than to pay DHL-FedEx-UPs. I guess I should look around a bit more and see what I might add to an order before confirming.

    +++++++++++++++
    What really upsets me is that it is very obvious that no inventory is kept in Taiwan, except for a few old bits that were purchased decades ago. There isn't an over-the-counter small quantity chip retailer on the island that is resupplying with new packages or the latest devices.

    Considering that something like 90% of the worlds chips are created here, I get a bit upset that I have to import nearly everything. It causes me to abandon a lot of projects. It seems that I am reimporting components made here.

    (In this case I have a $49 FPGA board that I want to upgrade the on-board EEPROM and if I were to buy just one from Digikey I would be paying about $25USD for the chip.)

    Those living in the USA may not appreciate how everything is easily available, and often with free shipping.

    ++++++++
    Enough of that, I am going to have something finished soon that I can bench test that was put together with locally purchased components.
  • Mouser claims it has 2Mbit surface mount I2C EEPROMs. I haven't seen these anywhere else, so I may just try to build an order and buy 12 or more for others that want expanded EEPROM mods to the Propeller 1 boards.
  • Cluso99Cluso99 Posts: 18,069
    Loopy, be careful. Not all EPROMs have the same block structure as the ones we use on the P1. You can change the P1V boot code, but then you cannot use anything written for 256/512 eeproms.
    The SMTP eeproms I use are the smaller footprint TSOP8, not the larger SOIC8. I always use 24x512 although I have tried 24C32 and 24C64 and they work provided you fiddle the binary before downloading. I did this trial as I wanted a cheap option when using an SD boot program that never requires changing.
    Anything you want, just let me know. It depends what orders I have going at the time as to what I can get. And I carry standard prop parts.
Sign In or Register to comment.