{"id":20522851,"url":"https://github.com/anachrocomputer/pic32mxblinky","last_synced_at":"2025-07-30T09:38:42.733Z","repository":{"id":230476516,"uuid":"779471102","full_name":"anachrocomputer/PIC32MXBlinky","owner":"anachrocomputer","description":"Rudimentary setup and main loop code for blinking LEDs on a PIC32MX250F256L","archived":false,"fork":false,"pushed_at":"2025-06-16T19:11:24.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T20:27:35.830Z","etag":null,"topics":["pic32mx"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anachrocomputer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-29T23:09:17.000Z","updated_at":"2025-06-16T19:11:27.000Z","dependencies_parsed_at":"2024-04-06T12:30:01.076Z","dependency_job_id":"e8b96d82-7a26-4aad-bc6a-ab209d8f8b62","html_url":"https://github.com/anachrocomputer/PIC32MXBlinky","commit_stats":null,"previous_names":["anachrocomputer/pic32mxblinky"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anachrocomputer/PIC32MXBlinky","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anachrocomputer%2FPIC32MXBlinky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anachrocomputer%2FPIC32MXBlinky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anachrocomputer%2FPIC32MXBlinky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anachrocomputer%2FPIC32MXBlinky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anachrocomputer","download_url":"https://codeload.github.com/anachrocomputer/PIC32MXBlinky/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anachrocomputer%2FPIC32MXBlinky/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264833294,"owners_count":23670617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pic32mx"],"created_at":"2024-11-15T22:37:06.266Z","updated_at":"2025-07-11T14:38:53.878Z","avatar_url":"https://github.com/anachrocomputer.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Static Badge](https://img.shields.io/badge/MCU-PIC32MX-green \"MCU:PIC32MX\")\n![Static Badge](https://img.shields.io/badge/IDE-MPLAB_X_V6.20-green \"IDE:MPLAB_X_V6.20\")\n![Static Badge](https://img.shields.io/badge/BOARD-Reach_Leg_Test_PCB-green \"BOARD:Reach Leg Test PCB\")\n\n# PIC32MXBlinky #\n\nBlink a LED on a PIC32MX250F256L dev board.\nMain loop timing by millisecond timer interrupt generated by Timer 1.\n500Hz square wave on RD11, pin 71.\nLED on RB9, pin 33, blinks at 1Hz.\nUART1 on pins 89 and 90 transmits at 9600 baud.\nTact switch or pushbutton on RA1, pin 38, with pull-up resistor.\nThree channels of PWM on OC1, OC2, and OC3 to drive an RGB LED.\n\nLater, we'll have:\n- SPI channels configured to send data\n\n## Connections ##\n\n| Name   | Port | Pin | PIC32MX795F512L pin | Activity           |\n|:-------|:-----|:----|:--------------------|:-------------------|\n| LED    | RB9  | 33  | 33                  | LED, active-LOW    |\n| SQWAVE | RD11 | 71  | 71                  | 500Hz              |\n| U1TX   | RG0  | 90  | 53 (RF8)            | UART1 transmit     |\n| U1RX   | RG1  | 89  | 52 (RF2)            | UART1 receive      |\n| BUTTON | RA1  | 38  | 38                  | Button, active-LOW |\n| RED    | RD0  | 72  | 72 (RD0/OC1)        | Red LED PWM        |\n| GREEN  | RD1  | 76  | 76 (RD1/OC2)        | Green LED PWM      |\n| BLUE   | RD2  | 77  | 77 (RD2/OC3)        | Blue LED PWM       |\n\n\nPIC32 pin numbers are for the 100-pin package.\n\nNote that the PIC32MX795F512L does not have PPS and therefore has all the\nperipheral pins pre-assigned.\nIt is not possible to assign U1TX to RF8 via PPS on the chips which do have it.\nWhich means that we have the plain GPIOs assigned the same,\nbut the UART assigned differently between the two classes of chip.\n\nLED on RB9 lights when the pin is pulled LOW.\nRGB LED lights when the PWM pin is HIGH.\n\n## Configurations ##\n\n| Name    | PIC32           | RAM  | Flash    | Clock | Notes                                                |\n|:--------|:----------------|:-----|:---------|:------|:-----------------------------------------------------|\n| default | PIC32MX250F256L |  32k | 256k+3k  | 48MHz | The usual PIC32 on the Reach Robotics Leg Test Board |\n| MoreRAM | PIC32MX570F512L |  64k | 512k+3k  | 48MHz | Modified board with 64k RAM                          |\n| Faster  | PIC32MX795F512L | 128k | 512k+12k | 80MHz | Modified board with 80MHz and 128k RAM               |\n\nThe PLL setup for the PIC32MX795F512L is different from the other two so that\nwe get an 80MHz SYSCLK.\nThis makes the PIC32MX795F512L about 4.5 times faster than the other PIC32s,\nonce we have switched on the cache and the prefetch buffer in 'initMCU()'.\nBut we must divide SYSCLK by two to get a 40MHz PBCLK which is within the limits of the chip.\nA #define in the code (FPBCLK) is used to calculate timer settings and baud rates.\n\n## PIC32 Toolchain ##\n\nMPLAB X V6.20 and 'xc32' V4.60.\nThese are not quite the latest versions,\nbut MPLAB X V6.20 is the last version to support my \"long obsolete\" ICD3 programmer.\n\n## PIC32 Programmer ##\n\nMicrochip ICD3.\nOther programmers should work, e.g. ICD4 or PICkit4.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanachrocomputer%2Fpic32mxblinky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanachrocomputer%2Fpic32mxblinky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanachrocomputer%2Fpic32mxblinky/lists"}