@philba: have you seen education today up close? The professor's comfort zone seems to trump initiative, in my experience
@Stitich626: I feel ya, my electronics prof refused (actually laughed) when I suggested I'd rather use an ATMEGA328 and the Arduino platform instead of PICs - 75% of the students in that class failed the final project and he had to scale the entire class
I'm not entirely sure of what the original question is, though. I get that you want to port over the schematic from the AT90S231 to a PIC16f877, but what specifically are you having trouble with? Let's break down the problem in a discrete set of small, individual problems that we can address one at a time.
With any microcontroller, you'll typically need the following:
- Programming interface
- Oscillator (unless using internal oscillator)
- Miscellaneous configuration - for example, the ATMEGA328 needs to have it's RESET pin pulled up for normal use.
First, identify how many digital inputs and outputs you need, and any analog inputs and outputs. Now, drop your 16f877 in a fresh schematic, and set it up by itself (power, programming interface as per the datasheet, oscillator). Microchip offers a helpful guide on configuring their various PIC chips for ICSP (see page 2-21 for your 16f877): http://ww1.microchip.com/downloads/en/d ... 30277d.pdf
Now, using whatever pins you have left, go through and connect the IO however is most intuitive. Keep track of which pin goes where (and maybe check the datasheet for pin configurations so you don't accidentally use some special-use pin). I would highly recommend writing a super simple program that ONLY turns on/off a single LED connected to a pin, so that you can verify that the things you've done so far work (ICSP, oscillator, configuration). Once the core system is working OK, then add your ULN2803, LEDs and sensors. You are breadboarding this all out first, right?