Program works!, however dont understand some DT-INT stuff.


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: Program works!, however dont understand some DT-INT stuff.

    thanks for catching that, I also had found that dt14 doesnt work when compiling to a 18 chip... I copied all the code to a new page and started going thru it line by line, I found that error but it still didnt run. I fixed it by copying the lines

    Code:
    @   INT_ENABLE   INT0_INT     ; enable external (INT) interrupts
    T1CON = $11                ; 01=.5s, 11=1s
    @ INT_ENABLE  TMR1_INT     ; enable Timer 1 interrupts
    strait from the webpages back to my program and it worked. I went back to my original file and pasted them and they were identical lines

    Code:
    @   INT_ENABLE   INT0_INT     ; enable external (INT) interrupts
    T1CON = $11                ; 01=.5s, 11=1s
    @ INT_ENABLE  TMR1_INT     ; enable Timer 1 interrupts
    @   INT_ENABLE   INT0_INT     ; enable external (INT) interrupts
    T1CON = $11                ; 01=.5s, 11=1s
    @   INT_ENABLE   TMR1_INT     ; enable Timer 1 interrupts
    All I had done was add some spaces to line stuff up a bit. and removed old lines, with the added spaces and it worked, So I was wondering if you have to have spaces just right, so I added the spaces back to the new code and it still worked??? so now I'm confused, then I went back to my first interupt program and modified that the same as these and it generated that error, thats when I noticed all the ones failing were useing DT_INTS-14.bas at the top. which worked for me as long as I only did either a timer or a INT, but not both, swapping over to the 18 and fixing that timer 0/1 error seems to have fixed it.

    I was getting frustrated that I was overlooking my error of copy/pasting from multiple sources, darrels timer program used timer 1, and the others used timer0 so there was a mixup during copy/paste.

    I have bot his sets of files for DT_INTS-14.bas and DT_INTS-18.bas If I assume the 18 is for 18F series chips whats 14 for, or am I not correct? he has 2 websites almost identical but I got confused on that. Right now the only chips I am using is the 18F4550, 12F683 & 675. I have others but am trying to stick mainly to these.

    But its working now and Ive seen the errors, Frustration Over! at least for that lesson now today im going to try to learn to add a keypad to INT if I can.
    Thanks for your help.
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Program works!, however dont understand some DT-INT stuff.

    Spaces were an issue in assembler when I went to school.

    Robert

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Program works!, however dont understand some DT-INT stuff.

    Hi,
    Yes, DT_Ints-14 is for PIC12 and PIC16 parts (which has a 14bit core) while DT_Ints-18 is for PIC18 devices.

    /Henrik.

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Program works!, however dont understand some DT-INT stuff.

    If you are using an 18F part ... you must use DT_INTS-18.

    The other PIC's ... 12F, 16F and 16F1, are all 14-bit cores.
    For those you must use DT_INTS-14
    DT

Similar Threads

  1. Replies: 1
    Last Post: - 23rd May 2009, 10:22
  2. Some pins dont work
    By The Master in forum General
    Replies: 9
    Last Post: - 2nd December 2007, 22:00
  3. I don't understand this program
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th June 2006, 00:03
  4. Need Help To Understand This Program
    By Danish in forum mel PIC BASIC
    Replies: 2
    Last Post: - 9th August 2005, 23:07

Members who have read this thread : 0

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