Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIC18 PWM Driver #21

Merged
merged 14 commits into from
Nov 21, 2024
Merged

PIC18 PWM Driver #21

merged 14 commits into from
Nov 21, 2024

Conversation

taisirhassan
Copy link
Contributor

No description provided.

include/softpwm.h Outdated Show resolved Hide resolved
@taisirhassan taisirhassan marked this pull request as ready for review October 10, 2024 16:21
include/pwm.h Outdated Show resolved Hide resolved
@taisirhassan taisirhassan force-pushed the port-pwm-driver-pic18f26k83 branch from 8a63c36 to eecee6e Compare October 13, 2024 15:21
pic18f26k83/pwm.c Outdated Show resolved Hide resolved
pic18f26k83/pwm.c Outdated Show resolved Hide resolved
@JasonBrave JasonBrave changed the title PIC18 PWM Driver Implementation PIC18 PWM Driver Oct 13, 2024
@taisirhassan taisirhassan linked an issue Oct 16, 2024 that may be closed by this pull request
@JasonBrave JasonBrave added this to the 2025.1 Release milestone Oct 21, 2024
@taisirhassan taisirhassan force-pushed the port-pwm-driver-pic18f26k83 branch from cfc6e61 to a64028d Compare October 28, 2024 23:53
include/pwm.h Outdated Show resolved Hide resolved
@taisirhassan taisirhassan force-pushed the port-pwm-driver-pic18f26k83 branch from 7d2da67 to ca1127b Compare October 29, 2024 16:55
@taisirhassan taisirhassan self-assigned this Oct 29, 2024
taisirhassan and others added 13 commits November 15, 2024 17:40
… switch cases for certain CCP modules using PPS. We should change this to either a macro function or a helper function to simplify it.
- Updated `updatePulseWidth()` to compute and set the duty cycle value for any CCP module (CCP1-CCP4).
- Removed module-specific constants, using dynamic calculations to determine the 10-bit duty cycle.
- Added range checking to ensure duty cycle values remain within 0-1023.
- Added macros in `pwm.h` to replace repetitive switch-case logic, simplifying PWM initialization and duty cycle configuration.
- Updated `pwm.c` to use the new macros for configuring CCP pin mappings, CCP mode, output pins, and duty cycle values.
…e a Struct to allow dynamic pin mapping instead of a macro which was rigid; add PPS configuration support and update documentation
@taisirhassan taisirhassan force-pushed the port-pwm-driver-pic18f26k83 branch from 4beb480 to 6897a2d Compare November 16, 2024 01:40
Copy link

@AshTheEngiqueer AshTheEngiqueer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@taisirhassan taisirhassan merged commit 189f9fd into master Nov 21, 2024
3 checks passed
@taisirhassan taisirhassan deleted the port-pwm-driver-pic18f26k83 branch November 21, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement PIC18F26K83 PWM driver
3 participants