seriall data application using PIC16F84A to light up leds

Started by rahzdapoj July 20, 2003
hi...
i'm desperately seeking for help...i'm trying to complete this
application but i cannot seem to light up the leds...i dunno whether
my program is functioning correctly..pls....i desperately need
help...the details of my application are given below.... serial data application
===========================

pulse--space(on)--pulse--space(on)--pulse---space(on)--pulse
_____ _____ _____ _____
| | 1 | | 2 | | 3 | |
_____| |___________| |____________| |____________| |_

0.6ms|0.3ms| 1ms |0.6ms|0.3ms| 1ms |0.6ms|0.3ms| 1ms |0.6ms
pulse (space) (space) (space)

(1st,2nd,3rd led on)
pulse--pulse(off)-pulse--pulse(off)--pulse-space(on)---pulse
_____ ____ ____ ____ _____ _____
| | | | | | | | | | | |
_____| |___| 1 |___| |___| 2 |____| |______3____| |_

0.6ms|0.3ms|0.6| 0.3|0.6|0.3 |0.6|0.3 |0.6 | 0.3 | 1ms |0.6 | 0.3 | (1st,2nd off, 3rd on)

a pulse is always called signalling the transmission of 16 types of
data. when ever an led is to
be ON a space(1ms)is called. if the led is to be OFF then another
pulse is called after the first
pulse and then following that 2nd pulse a third pulse is called to
signal the transmission
of the next data.

these pulses will be inputted to portA, 2 and the corressponding LED
is to be connected to
RB0-RB7. 2 PICs will be needed for sixteen LEDs using portB to
output to the LEDs.

i am using PIC16F84A and rc oscillator of 4MHz. please could anyone
help me because i am having
troubles lighting up my leds.

below i have included my program initially used but doesnt output
the required results.
p/s sw1 and sw2 are registers used to store the data first before
outputted to portb of the
2 pics.
are there problems with the delay that i have used????
i am open to any suggesttions.........thanx for any help possible