DT's INT's on 16F1936 an other stuff


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219

    Default DT's INT's on 16F1936 an other stuff

    trying to get going again after a couple of years doing other things. I have two questions.

    1. I am transitioning my home projects from the 16F886 to the 16F1936. On the 886, DT’s Ints-14 requires wsave# system statements for four banks of memory. I have compiled the 1936 with DT’s INT using NO wsave systems statements without errors. The 16F1936 has 31 banks of memory. I haven’t tried the working hardware yet because I am skeptical that it is going to work only part of the time and I will spend hours to find out I need some kind of statements which are not present to avoid periodic errors. Has anyone used this PIC with DT’s Interrupts or any other PIC with 31 banks? Comments please!

    2. why is my Serout2 statment working perfictly at 9600baud with a mode of 188 and not 84 at 8 Mhz. Mode 84 works great for 19200 baud. Never had this happen before.
    Wayne

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,793


    Did you find this post helpful? Yes | No

    Default Re: DT's INT's on 16F1936 an other stuff

    I Used in the past a 1939 one, and the first compilation had a message that I should add this:

    wsave var byte $70 system

    So, if you really need to add something, the compilation will give you the appropriate message.

    Regarding the Serout thing, if you show us your code maybe we can give an explanation.

    Ioannis

  3. #3
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: DT's INT's on 16F1936 an other stuff

    Thanks for the reply. So I feel better about the interrupts. Serout, ok.

    Code:
    asm
     __config _CONFIG1,_FOSC_INTOSC & _CLKOUTEN_OFF & _MCLRE_ON & _BOREN_OFF & _WDTE_OFF & _FCMEN_OFF & _CP_OFF & _CPD_OFF & _IESO_OFF
     __config _CONFIG2, _WRT_OFF & _PLLEN_OFF & _STVREN_ON & _BORV_LO 
    endasm  
    define  osc 8 
        OSCCON=%01110000   ;1110=8Mhz                                                   
        ANSELA=0   
        ANSELB=0    
        ADCON0=0
        PortA=0
        PortB=0                                      
        PortC=0 
        TrisA=0                                                                                
        TrisB=0        
        TrisC=0 
    
    Start:  
        toggle LatA.1
        pause 100
        toggle LatA.1
        serout2 USB_Tx,188, ["    Hello USB World",13,10]     'working 188 at 9600baud on com15 @8Mhz 
        pause 3000
        goto Start
    At mode 84 I'm getting 19200baud. Beats me what is going on. Of course if its working fine, not a big deal.
    Wayne

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,379


    Did you find this post helpful? Yes | No

    Default Re: DT's INT's on 16F1936 an other stuff

    there the problem
    define osc 8
    should be
    define OSC 8
    Warning I'm not a teacher

  5. #5
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: DT's INT's on 16F1936 an other stuff

    thanks Richard, I try that out. thats something I never thought about.
    Wayne

  6. #6
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: DT's INT's on 16F1936 an other stuff

    Changing "osc" to "OSC" did the trick. Com now acting as it should.
    Thanks.

Similar Threads

  1. Program works!, however dont understand some DT-INT stuff.
    By wdmagic in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 22nd April 2013, 07:13
  2. Capacitive sensing module on 16f1936
    By grahamg in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 25th April 2010, 15:17
  3. 16f1936
    By grahamg in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th April 2010, 11:03
  4. Using both hardware int and Timer Int together?
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th January 2010, 02:09
  5. 16F1936 doesn't seem to be supported?
    By ShortBus in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th October 2009, 16:56

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