Pulsin 16F819 problem


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2007
    Posts
    2

    Exclamation Pulsin 16F819 problem

    Hi there, this is my first post so be kind.
    I have been programming PICS for some time and always managed to find the solution to my problems. This one however has me beat.
    I am using Proton+ compiler 2.1.3 and trying to get pulsin to work on a 16F819. Never had a problem with pulsin before but on this chip it simply refuses to work. Since the original code was complex I wrote what I think is a very basic test program to get the pulsin to do something. Code follows...

    DEVICE 16F819
    OSCCON =$60 ' 4 MHz
    trisa = %11111111
    trisb = %00000000
    dim X1 as word
    dim X2 as word

    main:

    delayms 1000

    'pulsin PortA.4,0,X1
    'pulsin PortA.4,1,X2

    X1 = pulsin PortA.4,0
    X2 = pulsin PortA.4,1
    X1 = X1 + X2
    high portb.2



    delayms X1

    low portb.2

    goto main

    The idea is that if pulsin works I should see a changing square wave out of Portb.2. I am applying a 5 volt square wave signal to Porta.4 that varies from 20hz to 1000hz. I know you will all probably see the error I have made easily but I have definately confused myself with this on. Am running the internal OSC at 4mhz, have WDT off via the fuses on the ICProg software when programming the chip. Have tried setting the config fuses in software but that didn't help either. Thanks in advance.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by rekcahlaer View Post
    I am using Proton+ compiler 2.1.3.
    What's wrong with this picture?

  3. #3
    Join Date
    Apr 2007
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Newbie

    Wrong forum??

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    YES! You win!

    Ioannis

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Good answer!
    Survey SAYS!

Similar Threads

  1. Pulsin problem?
    By Skylar in forum mel PIC BASIC
    Replies: 3
    Last Post: - 27th May 2009, 15:40
  2. pulsin followed by serin2 problem
    By RSSHARPE in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 18th September 2005, 09:50
  3. a problem RF Signal with PULSIN
    By muskut in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd July 2005, 16:42
  4. Replies: 11
    Last Post: - 13th July 2005, 19:26
  5. Rb1 Problem On A 16f819..
    By Calco in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th April 2004, 15:09

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts