Ths depends on what ondition you want to drive the relays. If you simply want to turn them on with PIC, just make the port pins at logic 1. The relay should be connected in cllector loop of any medium power NPN transistor (like BC547) and its base should be connected to port pin of PIC through 4.7k resistor.
Re. chngibg to Basicpro. Stay with assembly. In may be a bit more difficult to start with. But once you have learned the instruction set, you will find it easy.
Assembly usually gives a more compact code than basic.
O.K ... my project is about measuring the beta of the transistor..
first of all the program should identify the type of the transistor (PNP or NPN) okay..
so when i put the BJT on its place in the circuit the microcontroller should change the polarity of the input voltage...according to the type of the BJT..
This is what you can try for testing whether the transistor is NPN or PNP
1) Apply 5V to collector through a 10k Resistor
2) Apply 5V to base through 10k resistor
3) Ground the Emitter
4) Check voltage at collector
5) If it is 0 (in digital sense) then make base voltage 0.
6) Now again check for collector voltage. If it is 5V (or high) then the transistor is NPN
OR
7) Ground collector through a 10k Resistor
8) Apply 0V to base through 10k resistor
9) Connect Emitter to 5V
10) Check voltage at collector
11) If it is at ~5V then make base voltage = 5V.
12) Now again check for collector voltage. If it is 0V (or high) then the transistor is PNP