• AVR Freaks

Hot!Output NCO and inverted NCO from two pins PIC16F18313

Author
didierleplae
Senior Member
  • Total Posts : 175
  • Reward points : 0
  • Joined: 2019/03/31 16:57:50
  • Location: 0
  • Status: offline
2020/07/11 13:33:59 (permalink)
0

Output NCO and inverted NCO from two pins PIC16F18313

Is there a way to output a square wave from the NCO and the inverted square wave from the same NCO from two different pins? I'm using a PIC16F18313
#1

7 Replies Related Threads

    davea
    Super Member
    • Total Posts : 275
    • Reward points : 0
    • Joined: 2016/01/28 13:12:13
    • Location: Tampa Bay FL USA
    • Status: offline
    Re: Output NCO and inverted NCO from two pins PIC16F18313 2020/07/11 13:49:27 (permalink)
    +3 (3)
    NCO set 50%
    and a CLC inverter
    or
    20.0 COMPLEMENTARY WAVEFORM
    GENERATOR (CWG) MODULE
    #2
    didierleplae
    Senior Member
    • Total Posts : 175
    • Reward points : 0
    • Joined: 2019/03/31 16:57:50
    • Location: 0
    • Status: offline
    Re: Output NCO and inverted NCO from two pins PIC16F18313 2020/07/12 11:01:14 (permalink)
    0
    Thanks, the CWG works great for this. I haven't figured out how to select the NCO as an input for the CLC.  
    #3
    Beau Schwabe
    Starting Member
    • Total Posts : 29
    • Reward points : 0
    • Joined: 2019/09/23 21:16:53
    • Location: 0
    • Status: offline
    Re: Output NCO and inverted NCO from two pins PIC16F18313 2020/07/12 11:16:29 (permalink)
    +1 (1)
    "I haven't figured out how to select the NCO as an input for the CLC."
     
    See Table 31-2 ... page 345
     
    [image]data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASsAAAA3CAYAAABUx2zgAAAHHUlEQVR4nO2dUW68LBTFXUwf+sYWuhHW0R004alJkz53CyzGfXQJ93sQ9HK5KDrz7wd4fgnJzKg4LWeOiHic6AI/Pz/0+fl5ZdOG8WSniaZpIuuJyFuawvv1MyKi2ZFhnxs3E9FMzoj1QHcc6lpoYml7ZZ1MBJs+lmJo23QmZ/j7+LEjYxzNYp+qJm/CdGWjo0adnVn+ocZR2gbBELLP2TKlEWJ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d68CsAOgY6LptYFYABKDrtkEGOwpKKNB12wUZ7CgooSCDve3yHySXEFE/VNFyAAAAAElFTkSuQmCC[/image]
     
    Reference PDF:
    https://ww1.microchip.com/downloads/en/DeviceDoc/PIC16-L-F15313_23-Data-Sheet-40001897B.pdf
     
     
    #4
    didierleplae
    Senior Member
    • Total Posts : 175
    • Reward points : 0
    • Joined: 2019/03/31 16:57:50
    • Location: 0
    • Status: offline
    Re: Output NCO and inverted NCO from two pins PIC16F18313 2020/07/12 11:52:20 (permalink)
    0
    That seems to be from the PIC16F15313 datasheet.
    I'm using PIC16F18313. Page 203 Table 21-1 seems to be the equivalent table and I don't see NCO on there. Maybe it's not possible on this chip?
     
    https://ww1.microchip.com/downloads/en/DeviceDoc/40001799F.pdf
    #5
    JPortici
    Super Member
    • Total Posts : 1114
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: offline
    Re: Output NCO and inverted NCO from two pins PIC16F18313 2020/07/12 12:00:22 (permalink)
    0
    Apparently you can't with the CLC, but you can with the CWG -> Register 20-4
    #6
    Beau Schwabe
    Starting Member
    • Total Posts : 29
    • Reward points : 0
    • Joined: 2019/09/23 21:16:53
    • Location: 0
    • Status: offline
    Re: Output NCO and inverted NCO from two pins PIC16F18313 2020/07/12 15:32:20 (permalink)
    0
    "That seems to be from the PIC16F15313 datasheet." -So it seems ... Sorry, I misread your part number
     
    You might be able to make clever use of the DSM module ... and pipe the NCO through that and invert the polarity
    post edited by Beau Schwabe - 2020/07/12 15:43:47
    #7
    RISC
    Super Member
    • Total Posts : 5775
    • Reward points : 0
    • Status: offline
    Re: Output NCO and inverted NCO from two pins PIC16F18313 2020/07/12 16:30:53 (permalink)
    0
    Hi,
    The fastest way to check/implement that is to use MCC.
    The plugin provides a graphical view of the CLC and other peripherals as well as all possible inputs sources for each signal and each possible output pins.
    This page will let you find lots of resources (ANxxx, TBxxx) on various CIPS (Core Independant Peripherals) which let combine lots of internal signals to craft some special patterns :
    https://www.microchip.com...erals/core-independent
    Regards

    For support make sure to check first here : http://microchipdeveloper.com
    There are hundreds of PIC, AVR, SAM...which one do YOU use ?
    #8
    Jump to:
    © 2020 APG vNext Commercial Version 4.5