• AVR Freaks

Hot!Forcefully preset of D-flip flop output when MCU is working (CLC of PIC16F15313)

Author
K.Sakai
New Member
  • Total Posts : 9
  • Reward points : 0
  • Joined: 2020/09/29 03:38:28
  • Location: 0
  • Status: offline
2020/10/27 03:02:49 (permalink)
0

Forcefully preset of D-flip flop output when MCU is working (CLC of PIC16F15313)

Hello,
 
I am considering CLC of PIC16F15313 and use D-flip flop as CLC1 & CLC2.
While Start-up or RESET, I understand to be able to set initial D-flip flop output with following.
 
//Initial (CLC1:CLC2)=(1,0)
CLC1POL = 0x08;
CLC2POL = 0x04;
 
I hope to forcefully change D-flip flop output while MCU is working, Is there any way to change them ?
(Forcefully presetting next output and update it when CLK is occurred)
 
For example...
(CLC1:CLC2)= (1,0) -> (0,1) -> (1,0) - forcefully preset -> (1,0)
 
K.Sakai
#1

2 Replies Related Threads

    NorthGuy
    Super Member
    • Total Posts : 6404
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: Forcefully preset of D-flip flop output when MCU is working (CLC of PIC16F15313) 2020/10/27 06:14:51 (permalink)
    +1 (1)
    Their flip-flops have both S (to set the output to '1') and R (to reset the output to '0') pins. I believe these are asynchronous (that is independent of the clock).
    #2
    Howard Long
    Super Member
    • Total Posts : 839
    • Reward points : 0
    • Joined: 2005/04/04 08:50:32
    • Status: offline
    Re: Forcefully preset of D-flip flop output when MCU is working (CLC of PIC16F15313) 2020/10/27 08:21:03 (permalink)
    0
    Yes, I have done this, twiddling the POL bits in code.
     
    Look at the ISR in the code attached in the link here:
     

    https://www.microchip.com/forums/m1128578-p3.aspx post #60

    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5