Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I NEED URGENT HELP

Status
Not open for further replies.

mr. mister

New Member
okay i've just built this project thing i was doing but it doesn't work :( :( :(

i've got the schematic and the code below

what is meant to happen is that when pic1 receives/detects a valid signal (of 2.094ms) from the rf receiver its connected to, it is meant to form its own pulsed output signals, which PIC 2 detects and generates specific outputs for.

can anyone look at my codes and schematic to see where the error lies??
 

Attachments

  • pic1.txt
    3.5 KB · Views: 117
  • pic2.txt
    4.7 KB · Views: 136
  • test_762.jpg
    test_762.jpg
    169.6 KB · Views: 762
Please ignore R5, R4, and R3 they are not in the main circuit

C3 = 10uf

C1=C2=C4=C5=22pf

Q1=Q4=4MHz crystal

the two resistors connected across the two diodes coming out of RB3 and RB4 are 220 ohms
 
mr. mister said:
okay i've just built this project thing i was doing but it doesn't work :( :( :(

i've got the schematic and the code below

what is meant to happen is that when pic1 receives/detects a valid signal (of 2.094ms) from the rf receiver its connected to, it is meant to form its own pulsed output signals, which PIC 2 detects and generates specific outputs for.

can anyone look at my codes and schematic to see where the error lies??

Why are you using two PIC's?, one should be plenty?.

For a start, simply connect an LED (with resistor) to an output pin of a single PIC, and use it to detect the incoming pulse - lighting the LED when it's correct. You could also have two other LED's, one which lights if it's too low, one if it's too high.

In this way you can test your pulse detrction routines to prove that part is working fine.

I would also suggest you try mentioning EXACTLY what you are attempting to do?, instead of just asking for what you think you need.
 
this is actually a test circuit i built for the main project

i've already added the leds to show that the various routines are working actually

i'm just trying to use this circuit to show that my code is actually working
 
PIC1 receives a pulsed signal from an rf receiver

reads the high input pulse, which should be about 2.094ms

then does a subtraction to test for tolerance meaning, i set a max value of maybe 2.2ms and a min value of 2ms and subtract it from the value read by the TMR0.

I bit test the carrier flag of the status register after subtracting the min and expect 0 and do the same after subtracting the max, expecting 1.

when it passes this stage, i create pulses that will be sent to pic 2, which in the major project will be transmitter by infrared

when pic two receives the signal, it will do a tolerance test like pic 1, in which when it passes, it sends uses a relay to cut out information to servos attached to it.

the info line in the test circuit is the line that carries the input signal from the rf receiver to the pic

this is a test circuit i built to make sure my code is working correctly
 
you cant expect the pic to respond reliably to to a 3 V signal..
because you are using digital inputs..
 
williB said:
a digital signal is on , off .. high , low.. 0V , 5V...
What is producing the input signal?


the rf receiver is producing the input signal

i somehow need to increase the voltage from 3v to 5v

is this possible without disrupting the input signal from the RF???
 
mr. mister said:
williB said:
a digital signal is on , off .. high , low.. 0V , 5V...
What is producing the input signal?


the rf receiver is producing the input signal

i somehow need to increase the voltage from 3v to 5v

is this possible without disrupting the input signal from the RF???

You could use a simple transistor inverter, which would invert the data, but you simply adjust your PIC program to correct for it.

But there's no need, a PIC should happily and reliably read a 3V logic signal.

I would suggest your best solution is to use some type of display to show what's happening, and get the pulse reading and checking working before you try and go further. If you have an LCD module you could use that, or (as you obviously have a computer) use an I/O to feed RS232 to the PC, and display it using Hyperterminal (or similar).

I still don't see the need for two PIC's though?.
 
hello nigel :D

r3, r4 and r5 are no longer in the circuit

oh and THE CIRCUIT WORKS :D , well half of it :( (pic one operation)

there must be an error in my code for PIC two

oh and this is not the main project, it is a test circuit to show that my code works. Main project requires two pics in two seperate areas of a toy car using the same codes
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top