Eprom emulator basics.

Discussion in 'Embedded Systems and Microcontrollers' started by Beetle_X, Nov 4, 2012.

  1. Beetle_X

    Thread Starter New Member

    Nov 2, 2012
    9
    0
    Hi, I would like to be able to change the program of a PIC on the fly. I'm comming up pretty much empty one a web search for how they work. Is there a particular search term that yeilds better results? :confused:
     
  2. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,128
    266
    You need a debugger, not an emulator.

    Google:

    Microchip ICD-3

    Microchip Pickit3

    Microchip MPLAB IDE
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,425
    3,359
    What do you mean by "change the program of a PIC on the fly"?
    Can you please elaborate?
    Why do you want to do this?
    There are traditional solutions available.
     
  4. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    989
    Explain what you mean by "change the program of a PIC on the fly"?

    Do you need a self modifying program? Do you need to be able to update the pic in circuit with a programmer? Do you need your users to be able to update the pic through a usb connector???

    What does "on the fly mean"?
     
  5. Beetle_X

    Thread Starter New Member

    Nov 2, 2012
    9
    0
    A Rom or Eprom Emulator as in the P.I.C and a PC are connected to something that emulates the P.I.Cs rom and is immediately altered by using the PC. The slang term for it is Romulator. A less know term is ROM Simulator. I really cant afford to buy one and making one would be great experience. Maybe Linux has free software for one.http://preview.web-ee.com/schematics/electronic_projects/eprom_emulator/


    I apologize for not proff-reading my first post.
     
    Last edited: Nov 4, 2012
  6. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    989
    That is not explain what "on the fly means".

    What do you want to do?
     
  7. MrChips

    Moderator

    Oct 2, 2009
    12,425
    3,359
    You might be thinking of microcontrollers that have ROM, UV-EPROM or OTPROM (one-time programmable ROM).

    Those days are gone. Microcontrollers now have FLASH memory and they can be programmed and reprogrammed "on the fly", i.e. at will by the IDE loader if that is what you mean.
     
    Beetle_X likes this.
  8. Beetle_X

    Thread Starter New Member

    Nov 2, 2012
    9
    0
    On the fly means changes can be made spontaneously and their effects are experienced immediately. Some Romulators are made that can rewrite a eprom while the program is running on the target processor (arbitration)?. I just think that they would be a great tool but they are considered a hackers tool to alter auto ecms/ecus and game consoles. I want to have one for My own P.I.C tool kit regardless of what it is being used on. Next year in NYS cars built before 96 won't even have a emissions inspections and in California you can't alter a car to Pollute LESS so is all a bunch of bull anyways. Consequently it is going to be used on a PIC 18 so I won't be stepping on proprietary software of breaking any EPA regulations.

    One of my main objectives with P.I.Cs was to use external memory so It would be a dual purpose skill. ;)
     
  9. MrChips

    Moderator

    Oct 2, 2009
    12,425
    3,359
    I am still not sure what you are getting at.

    On older computers code and data shared the same space. You were able to create self-modifying code, i.e. the code would change itself and be able to create interesting auto indexing functions. By today's standard that is considered a no-no.

    Computers that have common code and data space are able to place code in RAM and then execute that code. Is this what you mean by "change the program on the fly"?
     
  10. Beetle_X

    Thread Starter New Member

    Nov 2, 2012
    9
    0
    The program that the target processor is executing can be edited either immediately or just after the emulator RAM is edited and the P.I.C is reset. If the Romulator is made for it , you can edit the targets program code on the fly. With a Romulator the target processor executes code that is stored on the Romulators RAM,no burning at all and changes to the code or the whole program can be swapped in/out immediately. If your project is not working quite right , the program code can be modified immediately WHILE it is executing. I believe a PIC can store anything on a external chip whether it be the program or something used as an argument. I have not done much with computers for a while so my terminology is not going to be right on. NO burning. Program code is loaded from host laptop or whatever to Romulator and the host processor is also connected to the Romulator, the Romulators RAM specifically.Change program code immediately without removing the P.I.C from the Romulators DIP socket..;) ROM (Read Only Memory) Em-ulator ,or Romulator.
     
  11. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    I don't really understand about you or what you are doing for real.

    There are not really PICs capable to use external program memory. All PICs can only start up from internal memory.

    Before you make a change to the PIC, you need to recompile anyway.

    It would be interesting to know what P.I.C. or P.I.C.s you actually use.
     
  12. MrChips

    Moderator

    Oct 2, 2009
    12,425
    3,359
    I have seen some people use the term PICs when they really mean any generic MCU.

    What the op needs is a microprocessor with external RAM to which you can download code at will.

    When I used to debug PC mother boards, I built an SRAM adapter that replaced the BIOS ROM. The SRAM was first loaded with BIOS to which was added breakpoints. In this manner one was able to debug and fix a faulty mother board.
     
    Beetle_X likes this.
  13. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,647
    759
    Tuning a car, right?

    It seems that the OP would like to alter (maybe some specific settings) and reload the whole new soft into the PIC.

    But if it is only data which is read from external memory (my feeling) he could go away by being able to change only that data "on the fly".

    I am afraid he has not clear how but what he would like to (if such a thing is possible).
     
  14. Beetle_X

    Thread Starter New Member

    Nov 2, 2012
    9
    0
    The only cheap Romulators are for autos. I have a general interest in microprocessors but I have a divide between ecus and P.I.Cs ,specifically P.I.C 18 fs. I do not currently own a car that is chip-able to my knowledge. I have a project car that has an analog system that circuit mods are available for and it does not operate with a single IC.


    This page has a pdf on external RAM for a P.I.C. http://www.microchip.com/search/searchapp/searchhome.aspx?id=2&q=RAM And http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2698


    Thanks for the tip on using a Processor with external RAM. That may yield the results that I'm after. Any additional info on that topic would be great!
    This is from a P.I.C 18 manual.
    I'm in no way an authority on this subject. I have read a few books on Microrprocessors and a bunch of P.I.C guides and have a burner/project-kit but have never done much else.
     
    Last edited: Nov 6, 2012
  15. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Beetle_X likes this.
  16. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    It is not easy, you need dual port RAM. Or you need a bootloader inside the PIC, and switch over.

    External PIC RAM isn't normally added for debugging, or to emulate a EPROM.
     
    Beetle_X likes this.
  17. Beetle_X

    Thread Starter New Member

    Nov 2, 2012
    9
    0
    I think that my primary interest is altering program code. I could use program code to change anything in RAM could I not? So I have to have the P.I.C and whatever host computer (laptop) be able to write and read from the same memory chip. I'm not prepared to have a really educated discussion about this but the Processor has to be able to access the eprom or whatever and so does the host. A P.I.C can natively write to a external eprom so code does not have to be written for it but what about the hardware? I just started the P.I.C manual on writing to an external eprom so I'm ignorant at this point. I would have to get up to speed on the programming to have the host communicate via serial line with the target and or the eprom that they are both writing to. The host most likely is already capable where as it has a Rs233 so all the hardware besides for the cable would be needed but something to adapt to the shared eprom socket would be needed. Something I would find informative is whether a P.I.C needs a rs233 to communicate with a external eprom if the eprom is super close to the P.I.C? I imagine that the P.I.C could receive a signal from the host so it could synchronize the writing from the host so the program would not crash from a data collision. :confused:
     
Loading...