Porta t0cki


+ Reply to Thread
Results 1 to 8 of 8

Thread: Porta t0cki951 days old

  1. #1
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,560
    Thumbs Up
    Received: 76
    Given: 33
    Total Downloaded
    6.56 GB

    0 Not allowed!

    Default Porta t0cki

    I have a piece of code that runs an RTC and an interrupt on PORTA.4, using T0CKI.

    The RTC within the interrupt is working as expected, however, the variable I want to increment on T0CKI keeps incrementing, although the pin is always high, or low.

    I am suspecting that since I am using an LCD on PORTB, it could be that the interrupt is happing through PORTB, but IOC on PORTB is turned OFF.

    What am I doing wrong please?

    Code:
    Device = 18F26K22       ' Device selected
                            
    Xtal = 8                ' Selected frequency
    
    '________________________________________________________________________________________
    '*************************
    '* Define variable sizes *
    '*************************
    '>>>Variable declares<<<
    
        Dim Tot_Flow    As Word = 0     ' Tot_Flow used to store a total of 65535 ml
        
    '________________________________________________________________________________________
    ' Time variables
       
        Dim Hz      As Word = 0     ' Variable used to hold milli seconds value
        Dim Sec     As Byte = 0     ' Variable used to hold seconds value
        Dim Hour    As Byte = 0     ' Variable used to hold hour value
        Dim Minute  As Byte = 0     ' Variable used to hold minutes value
        Dim Timer1  As TMR1L.Word   ' Variable used to hold Timer1 ISR timing 
            
    '________________________________________________________________________________________      
    '*******************
    '* Define declares *
    '*******************
    '>>>Define declares<<<
    
    Dead_Code_Remove = 1                ' Remove dead code
    Declare Optimiser_Level  = 2
    
    Declare Float_Display_Type = LARGE  ' Use the more accurate, and faster, display subroutine
    
    Declare LCD_Type 0
    Declare LCD_DTPin PORTB.0
    Declare LCD_ENPin PORTB.5
    Declare LCD_RSPin PORTB.4
    Declare LCD_Interface 4
    Declare LCD_Lines 4
    
    ' Set Baudrate for USART 1 and USART 2
    Declare Hserial1_Baud = 57600    ' Set the Baud rate for USART1 to 57600
    Declare Hserial2_Baud = 57600    ' Set the Baud rate for USART2 to 57600
    
    Declare Hserial_Clear = On
    
    '________________________________________________________________________________________
    '*********************
    '* Set Pic registers *
    '*********************
    '>>>Analog, comparators etc..<<<
    
    PMD2     = %00001110    ' Enable / disable peripheral modules
                            ' Bit 0 = ADC module
                            ' Bit 1 = Comparator 1 module
                            ' Bit 2 = Comparator 2 module
                            ' Bit 3 = CTMU module
                            ' Bit 4 - 7 = Unimplemented
    
    VREFCON0 = %00000000    ' Turn OFF VREF
    CTMUCONH = %00000000    ' Turn OFF CTMU
    
    HLVDCON  = %00000000    ' Turn OFF HLVD
    CM1CON0  = %00000000    ' Turn OFF comparators
    CM2CON0  = %00000000    ' Turn OFF comparators          
    
    ADCON0   = %00000000    ' Disable analog on startup and select analog pins
    ADCON1   = %00000000    ' Select VREF; Connected to internal signal AVDD / AVSS
    ADCON2   = %10000011    ' Select FRC and right justify analog result
    
    TRISA    = %00010000    ' Configure PORTB I/O
    TRISB    = %10000000    ' Configure PORTB I/O
    TRISC    = %10000001    ' Configure PORTB I/O
                           
    WPUB     = %00000000    ' Disable PORTB pull-up
    
    ANSELA   = %00000000    ' Set analog / digital ports
    ANSELB   = %00000000    ' Set analog / digital ports
    ANSELC   = %00000000    ' Set analog / digital ports
    
    INTCON2  = %10000000    ' Disable all PORTB pull-ups; Bit 7 = 1
    IOCB     = %00000000    ' Turn OFF all Interrupt On Change on PORTB
    
    LATA = 0                ' Turn OFF PORTA
    LATB = 0                ' Turn OFF PORTB
    LATC = 0                ' Turn OFF PORTC
    
    DelayMS 100             ' Stabilise PIC and wait for handheld to finish
    
    '________________________________________________________________________________________
    '*******************************************************************
    '* Define Constants and/or aliases and define Input / Output PORTs *
    '*******************************************************************
    '>>>Symbols and aliases<<<
    
    Symbol T0PS0    = T0CON.0   ' Timer0 Prescaler Select bits
    Symbol T0PS1    = T0CON.1   ' Timer0 Prescaler Select bits
    Symbol T0PS2    = T0CON.2   ' Timer0 Prescaler Select bits
    Symbol PSA      = T0CON.3   ' Timer0 Prescaler Assignment bit
    Symbol T0SE     = T0CON.4   ' Timer0 Source Edge Select bit
    Symbol T0CS     = T0CON.5   ' Timer0 Clock Source Select bit
    Symbol T08BIT   = T0CON.6   ' Timer0 8-bit/16-bit Control bit
    Symbol TMR0ON   = T0CON.7   ' Timer0 On/Off Control bit
    
    '----------------------------------------------------------------------------------------
    
    Symbol TMR1ON   = T1CON.0   ' Timer1 On bit
    Symbol T1RD16   = T1CON.1   ' 16-Bit Read/Write Mode Enable bit
    Symbol T1SYNC   = T1CON.2   ' Timer1/3/5 External Clock Input Synchronization Control bit
    Symbol T1SOSCEN = T1CON.3   ' Secondary Oscillator Enable Control bit
    Symbol T1CKPS0  = T1CON.4   ' Timer1 Input Clock Prescale Select bit 0
    Symbol T1CKPS1  = T1CON.5   ' Timer1 Input Clock Prescale Select bit 1
    Symbol TMR1CS0  = T1CON.6   ' Timer1 Clock Source Select bit 6
    Symbol TMR1CS1  = T1CON.7   ' Timer1 Clock Source Select bit 7
    
    Symbol TMR1IF   = PIR1.0    ' TMR1 Overflow Interrupt Flag bit
    Symbol TMR1IE   = PIE1.0    ' TMR1 Overflow Interrupt Enable bit
    
    '----------------------------------------------------------------------------------------
    
    Symbol RBIF     = INTCON.0  ' Port B Interrupt-On-Change (IOCx) Interrupt Flag bit
    Symbol INT0IF   = INTCON.1  ' INT0 External Interrupt Flag bit
    Symbol TMR0IF   = INTCON.2  ' TMR0 Overflow Interrupt Flag bit
    Symbol RBIE     = INTCON.3  ' Port B Interrupt-On-Change (IOCx) Interrupt Enable bit
    Symbol INT0IE   = INTCON.4  ' INT0 External Interrupt Enable bit
    Symbol TMR0IE   = INTCON.5  ' TMR0 Overflow Interrupt Enable bit
    Symbol PEIE     = INTCON.6  ' Peripheral Interrupt Enable bit
    Symbol GIE      = INTCON.7  ' Global Interrupt Enable
    
    INTCON  = %00000000
    
    '----------------------------------------------------------------------------------------  
    
    Symbol RBIP     = INTCON2.0 ' RB Port Change Interrupt Priority bit
    Symbol NA1      = INTCON2.1 ' Unimplemented: Read as 0
    Symbol TMR0IP   = INTCON2.2 ' TMR0 Overflow Interrupt Priority bit
    Symbol NA2      = INTCON2.3 ' Unimplemented: Read as 0
    Symbol INTEDG2  = INTCON2.4 ' External Interrupt 2 Edge Select bit
    Symbol INTEDG1  = INTCON2.5 ' External Interrupt 1 Edge Select bit
    Symbol INTEDG0  = INTCON2.6 ' External Interrupt 0 Edge Select bit
    Symbol RBPU     = INTCON2.7 ' PORTB Pull-up Enable bit
    
    INTCON2 = %10000000
    
    '----------------------------------------------------------------------------------------
    
    Symbol INT1IF   = INTCON3.0 ' INT1 External Interrupt Flag bit
    Symbol INT2IF   = INTCON3.1 ' INT2 External Interrupt Flag bit
    Symbol NA3      = INTCON3.2 ' Unimplemented: Read as 0
    Symbol INT1IE   = INTCON3.3 ' INT1 External Interrupt Enable bit
    Symbol INT2IE   = INTCON3.4 ' INT2 External Interrupt Enable bit
    Symbol NA4      = INTCON3.5 ' Unimplemented: Read as 0
    Symbol INT1IP   = INTCON3.6 ' INT1 External Interrupt Priority bit
    Symbol INT2IP   = INTCON3.7 ' INT2 External Interrupt Priority bit
            
    INTCON3 = %00000000
    
    '----------------------------------------------------------------------------------------
    
    'Symbol Tmr1Val = 63535  ' 256 - 132 = cycles to interrupt. (124) 
    
    Symbol FUDGE_FACTOR = 14
    Symbol TMR1_VAL = (65536 - (XTAL*2500)) + FUDGE_FACTOR ' CALCULATE OSC OFFSET VALUES FOR 100 HZ INTERRUPT
    
    '---------------------------------------------------------------------------------------
    
    Symbol Led = LATC.4
    
    '________________________________________________________________________________________           
    
    PIE1    = %00000001     ' Bit 0 = 1 enables the TMR1 overflow interrupt
    PIE2    = %00000000
    PIE3    = %00000000
    
    LATA = 0                ' Turn OFF PORTA
    LATB = 0                ' Turn OFF PORTB
    LATC = 0                ' Turn OFF PORTC    
    
    On_Interrupt GoTo MULT_INT        ' Point to the interrupt handler 
    
    GoTo OVER_SUBS                    ' Jump over the subroutine
    
    '========================================================================================
    '________________________________________________________________________________________
    '***************************
    '* MULTI INTERRUPT HANDLER *
    '*************************** 
        
    MULT_INT: 
    Context Save                ' Save the FSR registers before continue with ISR
       
    '________________________________________________________________________________________
    ' External interrupt    
       
    If INT0IF = 1 Then 
        Inc Tot_Flow
        Clear INT0IF
        GoTo Exit
    EndIf
          
    
    '________________________________________________________________________________________
    ' Overflow interrupt @ 100Hz
        
    Timer1 = TMR1_VAL
    
    '----------------------------------------------------------------------------------------
        
    Inc Hz                          ' increase Hz
            
    If Hz = 100 Then 
            
        Inc Sec                     ' increase seconds
        Hz = 0                      ' Clear Hz
    
        If Sec = 60 Then            ' If Sec = 60 then
            Inc Minute              ' increase Minute
            Sec = 0                 ' Clear Sec    
        EndIf                       ' End If...Then instruction    
                                        
        If Minute = 60 Then         ' If Minute = 60 then
            Inc Hour                ' increase Hour
            Minute = 0              ' Clear Minute
        EndIf                       ' End If...Then instruction
    
    EndIf                           ' End If...Then instruction
                                
    Clear TMR1IF                ' Reset TMR1 interrupt flag
    
    Exit:                           ' Exit label
       
    
    '----------------------------------------------------------------------------------------
    
    IntExit:                        ' Interrupt Exit label      
       
    Context Restore                 ' Exit the interrupt
    
    '========================================================================================
    '________________________________________________________________________________________                
    '*********************
    '* OVER SUBS routine *
    '*********************
    '>>>Over subs<<<
    
    OVER_SUBS:      ' Over_Subs routine
    
    While GIE = 1 : GIE = 0 : Wend  ' Make sure that global interrupts are disabled
    While PEIE = 1 : PEIE = 0 :Wend ' Make sure that peripheral interrupts are disabled
    
    RCON.7 = 0      ' Disable priority levels on interrupts
    
    ' Timer 0
    T0PS0  = 0      ' \
    T0PS1  = 0      '  Timer0 Prescaler Select bits
    T0PS2  = 0      ' /
    PSA    = 1      ' TImer0 prescaler is NOT assigned. Timer0 clock input bypasses prescaler
    T0SE   = 1'0    ' Timer0 increment on low-to-high transition on T0CKI pin; Pin RA4
    T0CS   = 1      ' Timer0 transition on T0CKI pin
    T08BIT = 0      ' Timer0 is configured as a 16-bit timer/counter
    TMR0ON = 0      ' Enables Timer0
    
    INT0IF = 0
    TMR0IF = 0
    
    '----------------------------------------------------------------------------------------
    ' Timer 1
    
    TMR1IF   = 0    ' Clear the TMR1 Overflow Interrupt Flag bit
    
    T1RD16   = 1    ' Enables register read/write of Timer1/3/5 in one 16-bit operation
    T1SYNC   = 0    ' Do not synchronize external clock input
    T1SOSCEN = 0    ' Dedicated Secondary oscillator circuit enabled
    
    T1CKPS0  = 0    ' Timer1 Input Clock Prescale Select bit 0; Prescaler set 1:1
    T1CKPS1  = 0    ' Timer1 Input Clock Prescale Select bit 1; Prescaler set 1:1
    TMR1CS0  = 0    ' Timer1 clock source is instruction clock (FOSC/4)
    TMR1CS1  = 0    ' Timer1 clock source is instruction clock (FOSC/4)
    
    '----------------------------------------------------------------------------------------
    
    Timer1   = TMR1_VAL ' Load Timer1 offset value
    
    GIE    = 1
    PEIE   = 1
    TMR1IE = 1    ' Enables the TMR1 overflow interrupt
    TMR1ON = 1    ' Enables Timer1         
    
    '----------------------------------------------------------------------------------------
    
    Cls                     ' Clear LCD
    
    '----------------------------------------------------------------------------------------
    
    Pre_Main:
    
    Print At 1,1, Dec2 Hour , ":" , Dec2 Minute , ":" , Dec2 Sec
    Print At 2,1, Dec3 Tot_Flow
    
    DelayMS 100
    Toggle LATC.1
    
    GoTo Pre_Main
    
    '________________________________________________________________________________________
    '**********************
    '* Fuse Configuration *
    '**********************
    '>>>Fuse configuration<<<
    
    Declare Reminders Off
    @ CONFIG_REQ = 0 ; Override Compiler's configuration settings
    Asm-
    Config FOSC = HSMP	;HS oscillator (medium power 4-16 MHz)
    Config PLLCFG = Off	;Oscillator used directly
    Config PRICLKEN = On	;Primary clock enabled
    Config FCMEN = OFF	;Fail-Safe Clock Monitor disabled
    Config IESO = OFF	;Oscillator Switchover mode disabled
    Config PWRTEN = On	;Power up timer enabled
    Config BOREN = OFF	;Brown-out Reset disabled in hardware and software
    Config BORV = 190	;VBOR set to 1.90 V nominal
    Config WDTEN = OFF	;Watch dog timer is always disabled. SWDTEN has no effect.
    Config WDTPS = 32768	;1:32768
    Config CCP2MX = PORTC1	;CCP2 input/output is multiplexed with RC1
    Config PBADEN = On	;PORTB<5:0> pins are configured as analog input channels on Reset
    Config CCP3MX = PORTC6	;P3A/CCP3 input/output is mulitplexed with RC6
    Config HFOFST = OFF	;HFINTOSC output and ready status are delayed by the oscillator stable status
    Config T3CMX = PORTC0	;T3CKI is on RC0
    Config P2BMX = PORTB5	;P2B is on RB5
    Config MCLRE = EXTMCLR	;MCLR pin enabled, RE3 input pin disabled
    Config STVREN = OFF	;Stack full/underflow will not cause Reset
    Config LVP = OFF	;Single-Supply ICSP disabled
    Config XINST = OFF	;Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
    Config Debug = OFF	;Disabled
    Config Cp0 = OFF	;Block 0 (000800-003FFFh) not code-protected
    Config CP1 = OFF	;Block 1 (004000-007FFFh) not code-protected
    Config CP2 = OFF	;Block 2 (008000-00BFFFh) not code-protected
    Config CP3 = OFF	;Block 3 (00C000-00FFFFh) not code-protected
    Config CPB = OFF	;Boot block (000000-0007FFh) not code-protected
    Config CPD = OFF	;Data EEPROM not code-protected
    Config WRT0 = OFF	;Block 0 (000800-003FFFh) not write-protected
    Config WRT1 = OFF	;Block 1 (004000-007FFFh) not write-protected
    Config WRT2 = OFF	;Block 2 (008000-00BFFFh) not write-protected
    Config WRT3 = OFF	;Block 3 (00C000-00FFFFh) not write-protected
    Config WRTC = OFF	;Configuration registers (300000-3000FFh) not write-protected
    Config WRTB = OFF	;Boot Block (000000-0007FFh) not write-protected
    Config WRTD = OFF	;Data EEPROM not write-protected
    Config EBTR0 = OFF	;Block 0 (000800-003FFFh) not protected from table reads executed in other blocks
    Config EBTR1 = OFF	;Block 1 (004000-007FFFh) not protected from table reads executed in other blocks
    Config EBTR2 = OFF	;Block 2 (008000-00BFFFh) not protected from table reads executed in other blocks
    Config EBTR3 = OFF	;Block 3 (00C000-00FFFFh) not protected from table reads executed in other blocks
    Config EBTRB = OFF	;Boot Block (000000-0007FFh) not protected from table reads executed in other blocks
    Endasm-
    Declare Reminders On
    
    ' **** End of Fuse Configurator Settings ****
    
    '________________________________________________________________________________________
    Regards

    Joseph

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    526
    Thumbs Up
    Received: 60
    Given: 0
    Total Downloaded
    408.14 MB

    0 Not allowed!

    Default Re: Porta t0cki

    I'm not entirely sure what you're trying to use as the interrupt to increment Tot_flow, but you have this:
    Code:
    If INT0IF = 1 Then 
        Inc Tot_Flow
        Clear INT0IF
        GoTo Exit
    EndIf
    INT0 is PORTB.0, and you have that mapped to your LCD (LCD_DTPin PORTB.0)

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,560
    Thumbs Up
    Received: 76
    Given: 33
    Total Downloaded
    6.56 GB

    0 Not allowed!

    Default Re: Porta t0cki

    Thought so, and that is why the counter kept incrementing. I wasn't sure to what INT0IF was mapped to. So what is the flag that is used when an interrupt happen on T0CKI?

    Using a 16F88 I have a counter using T0CKI on PORTA.4, and when an interrupt happen on PORTA.4 I just check the flag and increment the counter as desired, clear the flag and exit the ISR. I am trying to do this on an 18F26K22 but it seems more problematic than I thought, at least for me.
    Regards

    Joseph

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #4
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,560
    Thumbs Up
    Received: 76
    Given: 33
    Total Downloaded
    6.56 GB

    0 Not allowed!

    Default Re: Porta t0cki

    Where have you seen it that INT0IF is mapped to PORTB? I wasn't able to spot it in datasheet, maybe I can see what is mapped to T0CKI.

    Thanks
    Regards

    Joseph

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #5
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    526
    Thumbs Up
    Received: 60
    Given: 0
    Total Downloaded
    408.14 MB

    0 Not allowed!

    Default Re: Porta t0cki

    So what is the flag that is used when an interrupt happen on T0CKI?
    That would be TMR0IF. For TMR0, look at the datasheet section 11. On page 156 you'll see INTCON.TMR0IE and TMR0IF.
    I assume you mean the TMR interrupt, and not the pin change.

    Where have you seen it that INT0IF is mapped to PORTB?
    For the INTx interrupts either look at table 10-5 on page 133 and/or section 9.9 INTn Pin Interrupts

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #6
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    526
    Thumbs Up
    Received: 60
    Given: 0
    Total Downloaded
    408.14 MB

    0 Not allowed!

    Default Re: Porta t0cki

    Using a 16F88 I have a counter using T0CKI on PORTA.4, and when an interrupt happen on PORTA.4 I just check the flag and increment the counter as desired
    Reading your description again I'm not sure I follow what you were doing before.

    T0CKI is the external clock input to TMR0. If you have TMR0 setup for an ext clock it automatically increments the TMR0 count.
    You don't get an interrupt when this pin changes, you only get a TMR0IF interrupt when TMR0 count overflows from FF-> 00

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  13. #7
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,560
    Thumbs Up
    Received: 76
    Given: 33
    Total Downloaded
    6.56 GB

    0 Not allowed!

    Default Re: Porta t0cki

    So it seems that I misunderstood how the counter work on TMR0. I had the impression that by a change of state on T0CKI, an interrupt would occur and than I could handle that interrupt to my needs.

    But now I have learned that actually, the T0CKI will increment a value in TMR0 whenever there is a change of state on T0CKI, and then I have to check how many `changes / pulses' there was at a specific time set by me.

    Am I correct of my assumptions?
    Regards

    Joseph

  14. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  15. #8
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    526
    Thumbs Up
    Received: 60
    Given: 0
    Total Downloaded
    408.14 MB

    0 Not allowed!

    Default Re: Porta t0cki

    Basically, yes.

    You can set TMR0 to count either rising or falling edges on the T0CKI pin as an 8 or 16-bit counter.

  16. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. [SOLVED !] control PortA
    By jergata in forum Proton Plus Compiler v3
    Replies: 1
    Last Post: 8th December 2008, 13:18
  2. on interrupt porta
    By ralf2 in forum Proton Plus Compiler v3
    Replies: 6
    Last Post: 12th October 2008, 00:16
  3. PORTA.3 on a 16f648a
    By Tim in forum Proton Plus Compiler v3
    Replies: 7
    Last Post: 6th February 2008, 04:19
  4. [SOLVED !] LCD on PORTA
    By RanOx in forum Proton Plus Compiler v3
    Replies: 7
    Last Post: 11th October 2007, 14:25
  5. Replies: 14
    Last Post: 23rd February 2007, 16:47

Tags for this Thread

Posting Permissions

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