Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About waxpanic1

  • Rank
    RC-Cam Visitor

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Location
    Silicon Valley, CA
  1. The next project I want to take on is connecting a PIC to the transmitter switch for one of the extra channels (Such as channel 5). The goal is to add extra buttons to the transmitter. A button press will be encoded by a PIC as a series of transmitter switch flips. A PIC on the receiver side will decode the transmitter switching. One PIC on the receiver side will be dedicated to converting the receiver pulses to pin outputs. A second PIC will carryout the commands (take picture, gear down, lights on, transmit data for example). Has anyone else tried to build a similar system? Any thoughts on the systems design? Cheers, WaxPanic1 Jeremy
  2. Eureka!!!! Powering the receiver off of the prototyping power supply got it up an running! The scale is a little off (low pulse = 105, neutral pulse = 143, high pulse = 180). Since the pulse error is greater on the High side, I'm guessing that this has to do with how the PIC measures the pulse. Now I need to explore this phenomenon. Great thinking on the common grounding! Now for some more information. Why does the PIC need to share a common ground / power supply with the receiver? Hey Matt...That was probably the same thunderstorm that woke me up (in California) two nights ago. CAM-MAN...thanks for the sage advice. I aspire to be as knowledgable about PIC's as you. WaxPanic1
  3. You are correct on all of your assumptions except with the PCB prototyping board. I am using a DHMicrosystems protyping board. It is very similar to the MELabs prototyping boards (I have one of those as well). I've used the board before to conduct other experiments (flashing LED, A/D conversion of a Temp sensor, and the sending of serial data to my laptop computer (of course). A photo of the board is attached to my reply. the schematics for the board can be found here: http://www.dhmicro.com/PDFs/Rapid18iXL_Man.pdf The crystal is an external 4Mhz crystal (with internal capacitors). My Radio Shack voltmeter can read oscillation frequencies up to 4 Mhz and it indicates that my crystal is running at 3.968 Mhz. The PIC is programmed with the following options: Oscillator: HS Code Protection: off WDT Enabled Power-up timer enabled Brown out Reset enabled Masterclear Reset Enabled Flash Program Write Enabled Internal External Switch Over Enabled Fail Safe Clock Monitor Enabled CCP Multiplex Enabled The PIC is powered by a wall wart that is converted from 15 volts to 5 volts by a 7805A Mosfet. The RC system is powered by its own battery pack (ThunderTiger Lipoly pack). The servo attached on another channel appears to be very stable (almost no jittering). I tried to use a Berg 4 microstamp 2 reciever as well (just to rule out the GWS reciever). I would have to rewire the circuit to disable the external oscillator (either desolder it or reconfigure the PIC wiring, so I'd like to do this as a last resort). Thanks for the help. Any other thoughts??? Waxpanic1
  4. I tried connecting a servor to the receiver prior to beginning the project just to see which channel on the TX went with the RX channel. Everything seemed to work like normal. I'm guessing that the problem is with my PIC code. Quickly looking on the RC groups discussion board reveals a number of people who have successfully created this circuit. All of the examples I could find, however, were written in assembly code (something I'm not familiar with). Cheers
  5. Well, It looks like I'm at a stand still at this point. I tried to measure the duration based upon a 0 state (Low pin pulse) and I tried to connect a 5V pull up by connecting a 10K resistor to the pin and a 5V source. The result of the pull up is readings of 0 (the pull up overwhelmed the receiver signal). I don't have an oscilloscope to assess the high state voltage or the receiver output signal pattern. can timing functions be performed on every PIC port that is an I/O port or does it need to be a special port?
  6. Whoops, I hit a button and I don't know what happened. I may end up posting a response twice. I tried to add an additional Pulsin command prior to performing the serial output (in fact, I added 4 more pulsin commands for extra assurance). The Serial output remained the same...there was just more readings. The highest values were averaged around 84 (82,83,84,85,87) and the lowest readings were centered around 3 (2,3,4). Changing the transmitter input has no effect upon the measured pulse width. I even added a line to make sure all of the port B pins were output except the pulsin pin (using the TRISB command) just to make sure that there wasn't any drift from untied down input pins. Here is the main loop that I tested out: ____________________________________________________________________ loop: 'Take a dummy Pulse In measurement to syncronize the PIC with the receiver signal. 'Then, Take a real measurement of the Input pulse width ON PORTB.1 & store in variable PO PulsIn PORTB.1, 1, PD PulsIn PORTB.1, 1, PI1 PulsIn PORTB.1, 1, PI2 PulsIn PORTB.1, 1, PI3 PulsIn PORTB.1, 1, PI4 'Send PO data out to monitoring computer serial port, baud = 2400 SerOut PORTB.0,T2400,["Dummy Pulse Duration = "] Pause 20 SerOut PORTB.0,T2400,[#PD,10,13,10,13] Pause 20 SerOut PORTB.0,T2400,["Real Pulse 1 Duration = "] Pause 20 SerOut PORTB.0,T2400,[#PI1,10,13,10,13] Pause 20 SerOut PORTB.0,T2400,["Real Pulse2 Duration = "] Pause 20 SerOut PORTB.0,T2400,[#PI2,10,13,10,13] Pause 20 SerOut PORTB.0,T2400,["Real Pulse 3 Duration = "] Pause 20 SerOut PORTB.0,T2400,[#PI3,10,13,10,13] Pause 20 SerOut PORTB.0,T2400,["Real Pulse 4 Duration = "] Pause 20 SerOut PORTB.0,T2400,[#PI4,10,13,10,13] Pause 1000 'Return to the Program Beginning GoTo loop ____________________________________________________________________ Matt...I also tried your suggestions. Indeed I am using an external 4Mhz oscillator on a PCB similar to the MELABS X-series. The only real difference I noted in your code was the definition of the oscillator speed, the use of SEROUT2, the change in baud rate, and the definition of i/o pins. I compiled you code as it was written (no errors...excellent job) and I loaded it onto the PIC16F88. When I ran the circuit, there was not output to the computer terminal. I don't think Windows Hyperterminal supports Inverted serial data. I changed the baud rate code to 32 (which operates at 19200 baud but in a Non-inverted form) and the serial output was recognized by my computer's terminal software. The output from the PIC only read either 0 or 1. It was as if the PIC wasn't measuring the pulsin at all. Any other suggestions? I'd really like to get this up and running (Matt, you had the right idea with the landing gear...very perceptive). Thanks!
  7. I am trying to use the pulsin command but, there is a lot of variability in the readings. Here is a list of the last 11 readings: Pulse Duration = 2 Pulse Duration = 3 Pulse Duration = 3 Pulse Duration = 2 Pulse Duration = 88 Pulse Duration = 88 Pulse Duration = 86 Pulse Duration = 2 Pulse Duration = 81 Pulse Duration = 82 Pulse Duration = 84 I am running the code on a PIC16F88 microchip. The RC receiver is a GWS PICO reciever. The PIC is reading off of channel 1 (Therefore, the receiver pulse should be about 1.5 msec when the transmitter stick is at the neutral "center" point). The PIC is built up on a PCB prototyping board (one of the DH Microsystems prototyping PCBs). The PICBasic Pro code I am running is below: '--------[Title]----------------------------------------------- ' 'Purpose: RC Transmitter -> RC Reciever -> PIC 'Compiler: PIC Basic Pro 'Created: 11Jan2005 'By: WaxPanic1 ' '--------[Description]----------------------------------------- ' ' 'To determine if Transmitter switch (Channel 5) 'is ON (receiver signal = 2 msec) or 'OFF (receiver signal = 1 msec) ' ' ' '-------[PCP Program Includes]--------------------------------- ' ' ' INCLUDE "modedefs.bas" ' Mode definitions for Serout ' ' ' '--------[Define Variables]------------------------------------ ' ' PO VAR BYTE 'Define variable to contain Pulse Count ' ' ' '-------[Main Program Loop]------------------------------------ ' ' loop: 'Measure the input pulse width on PortB.1 & store in variable PO PulsIn PORTB.1, 1, PO 'Send PO data out to monitoring computer serial port, baud = 2400 SerOut PORTB.0,T2400,["Pulse Duration = "] Pause 20 SerOut PORTB.0,T2400,[#PO,10,13,10,13] 'Return to the Progam Beginning GoTo loop End
  8. Hi Gang, I am in the process of building a new PIC microchip application. I want to use the extra channels on my RC transmitter to trigger the PIC response. Therefore, the PIC will be looking at the RC receiver to determine if there has been a change in the transmitter switch (a pulse duration change from 1 msec to 2 msec). The PIC input from the receiver is similar to the input for the Aiptek CAM-Man project and the RCFS project. The timing diagram for the RCFS project is very helpful for my design (providing me with the background informaiton I need to understand the RC receiver's typical output signal). The place where I am struggling is establishing the PIC code to determine the pulse duration during the high signal condition (1 msec, 1.5 msec, 2 msec, etc.). I typically use a PICBASIC Pro compiler when I build applications. Therefore, a solution using PBP is most helpful. I may have to resort to assembly code to find my solution (I'm fine with that). Can anyone out there provide me with a PICBasic Pro or assembly code example to help me? Cheers
  • Create New...