Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anachrocomputer/pic32reach
Rudimentary setup and main loop code for blinking five LEDs on a PIC32MX550F256L. Should also work on other PIC32MX chips with similar peripherals, e.g. PIC32MX250F256L.
https://github.com/anachrocomputer/pic32reach
i2c i2c-bus leds pic32 pic32mx pwm spi
Last synced: about 1 month ago
JSON representation
Rudimentary setup and main loop code for blinking five LEDs on a PIC32MX550F256L. Should also work on other PIC32MX chips with similar peripherals, e.g. PIC32MX250F256L.
- Host: GitHub
- URL: https://github.com/anachrocomputer/pic32reach
- Owner: anachrocomputer
- Created: 2019-01-17T21:17:00.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-03-29T19:59:22.000Z (9 months ago)
- Last Synced: 2024-03-29T20:46:56.064Z (9 months ago)
- Topics: i2c, i2c-bus, leds, pic32, pic32mx, pwm, spi
- Language: C
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PIC32Reach #
Blink five LEDs on a PIC32MX550F256L dev board from Reach Robotics.
Millisecond timer interrupt generated by Timer 1.
Also sends characters to all five USARTs,
generates PWM on OC1 and OC2,
and accepts analog input from a pot on AN6.
Two SPI channels configured to send data, SPI2 at 2MHz and SPI3 at 1MHz.
SPI2 sends a 16-bit word every 22.6us (44.1kHz).
SPI3 sends variable-length packets at certain times in the main loop.## Connections ##
| Name | Port | Pin | Activity |
|------|------|-----|------------------|
| LED1 | RE6 | 4 | LED, active-LOW |
| LED2 | RE7 | 5 | LED, active-LOW |
| LED3 | RE1 | 94 | LED, active-LOW |
| LED4 | RA7 | 91 | LED, active-LOW |
| LED5 | RA6 | 92 | LED, active-LOW |
| U1TX | RE5 | 3 | UART1 transmit |
| U2TX | RG0 | 90 | UART2 transmit |
| U3TX | RF1 | 88 | UART3 transmit |
| U4TX | RD4 | 81 | UART4 transmit |
| U5TX | RD12 | 79 | UART5 transmit |
| SCK2 | RG6 | 10 | SPI Clock |
| SDO2 | RC13 | 73 | SPI MOSI |
| SS2 | RD9 | 69 | SPI CS |
| SCK3 | RF13 | 39 | SPI Clock |
| SDO3 | RG8 | 12 | SPI MOSI |
| SS3 | RA0 | 17 | SPI CS |
| PWM1 | RD8 | 68 | OC1 PWM output |
| PWM2 | RD0 | 72 | OC2 PWM output |
| Pot | RB6 | 26 | AN6 analog input |PIC32 pin numbers are for the 100-pin package.
LEDs light when the pin is pulled LOW.
## PIC32 Toolchain ##
MPLAB X V3.45 and 'xc32' V2.15.
These are quite old versions now, so I really ought to upgrade!## PIC32 Programmer ##
Microchip ICD3.
Other programmers should work, e.g. ICD4 or PICkit4.