Specific Pic Progra...
 
Notifications
Clear all

Specific Pic Programming

30 Posts
5 Users
0 Reactions
20.4 K Views
Posts: 6728
(@p-short)
Illustrious Member
Joined: 19 years ago
dirknerkle wrote:I found some old code that might be helpful...

I'm pretty sure that none of those are it.


Reply
Posts: 446
Topic starter
(@amigorick)
Honorable Member
Joined: 16 years ago

we only plan on using one Renard SS8 to run the wheels. I could even
use only four channels and just plug both wheels into the same plugs as
the other wheel. So at the most, one pic would be enough.
maybe that makes it a little easier! Thanks!!

P. Short wrote:But I'm playing around with creating (or recreating) an AC chase controller for up to 2-8 channels on one PIC. Trying to span more than one PIC is more than what I have the time or inclination to create. Maybe in a day or so.

Reply
Posts: 6728
(@p-short)
Illustrious Member
Joined: 19 years ago

I haven't forgotten this thread.

I've just created a PIC16F688 program (renard-chase) based on bits and pieces of code from here and there, and am about to do some testing of it.

Perhaps I got a bit carried away, especially since it would likely be a one or two line change to the diagnostic PIC that does a lamp test (if I had the source, which I don't) to do what was requested. The program that I'm working on has a few extra bells and whistles:

1) It has a user knob that controls the rate of the chase.
2) It has a user knob that controls which outputs are the first and last in the chase (allowing up to eight lights in the chase)
3) It has a user knob that controls the direction of the chase
4) It has a user knob that determines if the chase always continues in one direction, or changes direction when it hits a 'limit'
5) It has a user knob that controls the attack rate (i.e. does a light come on full-brightness when it first turns on, or does it's brightness ramp up)
6) It has a user knob that controls the decay rate
7) It has a user knob that determines how many outputs are on at once.

By 'user knob' I mean a #define statement near the beginning of the assembly file that the user can change.


Reply
dirknerkle
Posts: 10310
(@dirknerkle)
Illustrious Member
Joined: 18 years ago

This brings up a curiosity I've always had...

How much "slush" time is there in the ISR part of the Renard code for inserting additional code? Or is there any time for checking the status of a value or two?


Reply
Posts: 6728
(@p-short)
Illustrious Member
Joined: 19 years ago

Depends.

When using either a PIC16F1825 or an external 18.432 MHz oscillator with a PIC16F688 there is a bit of room for 'slush'. With the PIC16F688 using it's internal oscillator there isn't much, if any, extra room.

The limiting factor is whether or not the ISR uses up so much of the CPU bandwidth that the foreground Renard protocol processing code can't keep up with the result that the UART under-runs, losing data. It's been a long time since I've counted instructions in both the ISR and foreground code to know what the maximum baud rate is that would work with '688 using it's internal oscillator, nor exactly how much slush there is in the other configurations.

Edit: What do you have in mind?


Reply
Page 3 / 6
Share: