I have done some medium complexity PIC designs and now am working on
some designs that need to do some fairly complicated multitasking. I
need to do several serial inputs and outputs, display multiplexing and
precision high speed pulses at the same time. I am looking for a
consultant that would teach me the correct programming procedures for
these and future problems, not just someone to do the design for me. I
am also looking for someone who would teach me at less than the normal
rate. While I appreciate what a good engineer is worth, I don't want to
pay $100 an hour for someone to just talk to me on the phone for a few
hours a week.
To be a little more specific one current project I am working on needs
to
read a 9600 baud serial heading sentance from a marine gyro and convert
the format. The output is 16 bits of clock and data on two lines with a
50uS clock rate. This repeats every 25mS. I will also need to output
the heading on 4 multiplexed LED displays, read key inputs and output a
serial data output.
My problem is getting all tasks to work together without screwing up any
Have a look at the approach I used in "getting started" for the AVR.
The dontronics site has a reasonable version, or I can email you the latest
and greatest.
Dave VanHorn wrote:
>
> Have a look at the approach I used in "getting started" for the AVR.
> The dontronics site has a reasonable version, or I can email you the
> latest
> and greatest.
>To be a little more specific one current project I am working on needs
>to read a 9600 baud serial heading sentance from a marine gyro and convert
>the format. The output is 16 bits of clock and data on two lines with a
>50uS clock rate. This repeats every 25mS. I will also need to output
>the heading on 4 multiplexed LED displays, read key inputs and output a
>serial data output.
>My problem is getting all tasks to work together without screwing up any
>of the timings.
It's really a trivial task.
No need to waste money "consulting a consultant"
1) choose a fast pic with hard uart (could be done by soft, but stay simple, ok
?).
2) use a "all interrupt driven" design.
A int task collect the 9600 bds flow filling a buffer
A 50 us int timer create the clocks pulse and empty this buffer to set the data
line.
All others tasks could be done during the non-interrupted program flow
or with the help of other slower timers (thinking about the multiplexed display)
.