Hi guys,
The task that I am required to do is to convert a 4800bps data which has a bit period of 1/56000 seconds, into 2400bps with a bit period of 1/4800s.
So essentially, you can think of it has trimming half of the data, and transmitting at a different rate - with a different utilization (or duty cycle if you can call it that).
I'm using Hi-tech C to do the programming, and a PIC18F2550.
I've been looking around for sample codes that does that, but couldn't quite find much. The extent that i have thought thus far, is basically:
Set 1 pin for input
Set 1 pin for output
Take data from input pin and store it in an array using oscillator A.
and output half the array (to half the data) to output pin using a different oscillator B.
Since i'm planning to have a duty cycle of 50%, I was thinking of using a watchdog timer and make the input pin interrupt driven.