Problems RE3 with PIC 18F26K22

Başlatan buntger, 16 Haziran 2016, 01:12:04

buntger

Hello,
I want to use the PortE3 as input with a pushbutton and Pic 18F26K22,
When pulse is not responding.
Where is the error¿?

    Device = 18F26K22
    Xtal = 16   


Config_Start
 FOSC = INTIO67       ' HS oscillator (high power > 16 MHz)
 PLLCFG = On 'On      ' Oscillator multiplied by 4
 PRICLKEN = On        ' Primary clock enabled
 FCMEN = OFF           ' Fail-Safe Clock Monitor disabled
 IESO = Off              ' Internal/External Oscillator Switchover mode disabled
 PWRTEN = On           ' Power up timer enabled
 BOREN = SBORDIS       ' Brown-out Reset enabled in hardware only (SBOREN is disabled)
 BORV = 190            ' Brown Out Reset Voltage set to 1.90 V nominal
 WDTEN = Off           ' Watch dog timer is always disabled. SWDTEN has no effect.
 WDTPS = 128           ' Watchdog Timer Postscale 1:128
 CCP2MX = PORTC1       ' CCP2 input/output is multiplexed with RC1
 PBADEN = Off          ' PORTB<5:0> pins are configured as digital I/O on Reset
 CCP3MX = PORTC6       ' P3A/CCP3 input/output is multiplexed with RC6 
 HFOFST = On           ' HFINTOSC output and ready status are not delayed by the oscillator stable status
 T3CMX = PORTC0        ' Timer3 Clock Input (T3CKI) is on RC0
 P2BMX = PORTB5        ' ECCP2 B (P2B) is on RB5
 MCLRE = INTMCLR       ' MCLR pin enabled, RE3 input pin disabled 
 STVREN = Off          ' Stack full/underflow will not cause Reset
 LVP = Off               ' Single-Supply ICSP disabled
 XINST = Off           ' Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
 Debug = Off           ' Disabled
 Cp0 = Off             ' Block 0 (000800-001FFFh) not code-protected
 CP1 = Off             ' Block 1 (002000-003FFFh) not code-protected
 CP2 = Off             ' Block 2 (004000-005FFFh) not code-protected
 CP3 = Off             ' Block 3 (006000-007FFFh) not code-protected
 CPB = Off             ' Boot block (000000-0007FFh) not code-protected
 CPD = Off             ' Data EEPROM not code-protected
 WRT0 = Off            ' Block 0 (000800-001FFFh) not write-protected
 WRT1 = Off            ' Block 1 (002000-003FFFh) not write-protected
 WRT2 = Off            ' Block 2 (004000-005FFFh) not write-protected
 WRT3 = Off            ' Block 3 (006000-007FFFh) not write-protected
 WRTC = Off            ' Configuration registers (300000-3000FFh) not write-protected
 WRTB = Off            ' Boot Block (000000-0007FFh) not write-protected
 WRTD = Off            ' Data EEPROM not write-protected
 EBTR0 = Off           ' Block 0 (000800-001FFFh) not protected from table reads executed in other blocks
 EBTR1 = Off           ' Block 1 (002000-003FFFh) not protected from table reads executed in other blocks
 EBTR2 = Off           ' Block 2 (004000-005FFFh) not protected from table reads executed in other blocks
 EBTR3 = Off           ' Block 3 (006000-007FFFh) not protected from table reads executed in other blocks
 EBTRB = Off           ' Boot Block (000000-0007FFh) not protected from table reads executed in other blocks
Config_End

TRISE  = 001000        ' PortE.3 Input

Symbol Break = PORTE.3   'Rename PortE3

CLS                                'Clear Display

WaitPulse:

 Repeat                                       'Ini Bucle button
      Print At 2,10,"Waiting ......"
Until Break=1


  Print At 2,10,"OK Break ..."
  DelayMS 3000
  GoTo WaitPulse

END


Scheme:



F.T

TRISE  = 001000        ' PortE.3 Input

TRISE  = %001000        ' PortE.3 Input
Hakk şerleri hayr eyler Zannetme ki gayr eyler Ârif anı seyreyler Mevlâ görelim neyler Neylerse güzel eyler.

buntger

#2
Hey,

I have changed %, but still does not work.
Goes directly to "Waiting ......".

Because it does not work¿?...

THX

mesaj birleştirme:: 16 Haziran 2016, 13:07:32

Hey,

Now Works perfect, I did not see that on the board there is another Reset Micro-button and pin RE3 always arrive 3V.
So always goes directly "Ok Break ....."

THX.