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.

PIC 16F877A problem

Status
Not open for further replies.

amerotke

New Member
Hi to all. I want to make wireless joystick. Because of it as a first step I wanted to make a circuit which can sense tilt. I used memsic 2125 tilt and acceleration sensor. It has 3 outputs. Two of them are tilt sensor output one of them is temperature output. I dont interest temperature output. Tilt output is in PWM format and its cycle period is 10 ms. I wanted to decode this output with pic 16 F 877A. I used port A 1 and Port A 2 as input and connect LEDs to PORTB and PORTD. I wrote a programm with pic assembler. I used TMR0 interrupt and wanted to create interrupt each 56 microsecond. My programme works how I want in oshonsoft simulator. But when I put on circuit all LEDs light turned on but not shiny. I thought my program is working but very fast and I couldnt see turned on and turned off LEDs firstly. But according to my program some of leds should be never turned on some of them should be never turned off unless move to sensor. I changed program and wrote a little program which turned on only portB LEDs . It didnt work. And result was same..all LEDs in port B and Port D were slighty on. It is interesting that when I remove sensor which was connected to PORTA 1 and 2 leds were off. But When I remove oscillator chrystal , nothing change. I changed pic integrated circuit and I used another one. Result was same. What is my problem? Should I change inputs from port a to other one else?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top