Flashing Firmware in PIC, PGC pin details? [resolved]

siddhantsiddhant Pilani
edited June 2020 in Cyton

If someone could share some light on how the firmware is flashed in the PIC from the RFduino if the PIC is in the Bootloader Mode. What is the use of the PGC pin that is connected to the RFDuino?

Comments

  • wjcroftwjcroft Mount Shasta, CA

    Siddhant, hi.

    Can you mention why you are flashing the firmware? When did you purchase your Cyton? Has it worked correctly in the past?

    If the two RFduinos (dongle and mainboard), are working correctly; and the bootloader in the PIC is functioning -- then these instructions will upload new PIC / chipKIT firmware:

    https://docs.openbci.com/docs/02Cyton/CytonProgram

    If your RFduinos are non-functional, they can be reloaded,

    https://docs.openbci.com/docs/02Cyton/CytonRadios

    If your radios are somehow on different radio channels, there is an AUTOSCAN function in the GUI.

    William

  • Hi William,

    I am a college student and am working on some changes in the firmware. But I couldn't understand how the firmware is being added in the PIC with the help of RFduinos. As I am a student, I was curious to know how and what function does the PGC pin play in flashing of the firmware. So that's why I wanted to understand how that works. I bought a Cyton around November last year. Yes, it has been working perfectly fine since.

    Siddhant

  • wjcroftwjcroft Mount Shasta, CA
    edited June 2020

    At the factory, the chipKIT 'Arduino' serial port bootloader is installed. This allows PIC firmware to be flashed over the radio serial port link. Rather than requiring an external programmer (such as PICkit). The dongle RFduino appears as a usb serial port on your laptop. Serial data sent from that port appears as serial data at the PIC.

  • Alright, then what role does the PGC pin play during this process?

  • wjcroftwjcroft Mount Shasta, CA
    edited June 2020

    I don't have the RFduino firmware in front me of at the moment, you can look at it yourself. But my guess is that during a firmware upload, the mainboard RFduino asserts the PGC pin to the PIC at the beginning of the sequence(?)

    It is possible to use an external programmer such as PICkit. But if the PIC bootloader is intact, that is not necessary.

  • wjcroftwjcroft Mount Shasta, CA
    edited June 2020

    Also note that the mainboard PIC and RFduino, are reading the Cyton PROG button during a firmware update. So that is being interpreted by one or both microcontrollers. And may condition the RFduino to assert PGC to the PIC.

Sign In or Register to comment.