Multiple versions
 
Notifications
Clear all

Multiple versions

7 Posts
5 Users
0 Reactions
5,142 Views
Posts: 6728
Topic starter
(@p-short)
Illustrious Member
Joined: 20 years ago
[#294]

Right now there are two versions of the source code firmware file (one for regular use, one for PWM), and there will shortly be a third version (DC-only PWM mode). This will become more and more of a mess to keep updated (ensuring that bug fix in one version ends up correctly implemented in the others), so I intend to go back to one source file, with DEFINE statements to select between the various options. There will be one line that the user will have to change to enable PWM use, and one other line to enable DC operation.

--

Phil


6 Replies
Posts: 229
(@mrplow123)
Reputable Member
Joined: 19 years ago

That is a great idea. It will make things alot cleaner and easier to follow.


Reply
Posts: 0
(@cmurray)
Joined: 1 second ago

What about baud rate
and internal vs external clock.

Just trying to be difficult.

joel

And don't loose that diagnostic code.
Got a feeling a lot of people are going to be using it this year.


Reply
Posts: 6728
Topic starter
(@p-short)
Illustrious Member
Joined: 20 years ago

There is already a DEFINE for baudrate, as well as one for the clockrate. Changing the clock source takes a one line change, I think, in the __CONFIG statement.

--

Phil


Reply
FireGod
Posts: 655
(@firegod)
Honorable Member
Joined: 19 years ago

What is the difference between the DC PWM and the AC PWM code?


Reply
Posts: 6728
Topic starter
(@p-short)
Illustrious Member
Joined: 20 years ago

In AC PWM mode the PWM is synchronized to the AC power line (more specifically to the zero-crossing), in DC PWM mode it is free-running (so the zero-crossing signal is ignored).

--

Phil


Reply
tconley
Posts: 410
(@tconley)
Honorable Member
Joined: 19 years ago

Thank you for all that work so i can do my project


Reply
Share: