Ik heb een vreemd iets waar ik niet uit kom, misschien iets simpels en kleins maar ik zie het dan vast over t hoofd... Het volgende: Heb een piezo buzzertje van 5V ( < 10mA ) en deze hangt rechtstreeks met de + aan PORTC.2 van mijn PIC en met de - aan GND. Als ik deze poort hoog maak hoor ik een mooi pieptoon, echter zodra ik ook maar 1 van de andere C Poorten hoog maak wordt de uitgang laag. Ik heb heel mijn programma nu gereduceerd tot het onderstaande als test maar het blijft. Ik heb uiteraard alle Oscillator instellingen en snelheden geprobeerd. De printplaat is ruimschoots voorzien van 100nfjes en als voeding USB/Adapter/Labvoeding geprobeerd met hetzelfde resultaat.

Wie o wie ?

Device 18F14K22

Xtal = 64   ' = 16 mhz interne OSC * 4 PLL

Config_Start
    FOSC = IRC ;HS	; Internal RC oscillator
    PLLEN = OFF ; PLL is under software control
    PCLKEN = OFF ; Primary clock is under software control
    FCMEN = OFF ; Fail-Safe Clock Monitor disabled
    IESO = OFF ; Oscillator Switchover mode enabled
    PWRTEN = OFF ; PWRT enabled
    BOREN = OFF ; Brown-out Reset enabled and controlled by software (SBOREN is enabled)
    BORV = 30 ; VBOR set to 2.2 V nominal
    WDTEN = OFF ; WDT is controlled by SWDTEN bit of the WDTCON register
    WDTPS = 64
    MCLRE = OFF ; RE3 input pin enabled; MCLR disabled
    HFOFST = OFF ; The system clock is held off until the HF-INTOSC is stable.
    STVREN = OFF ; Stack full/underflow will cause Reset
    LVP = Off	; Single-Supply ICSP enabled
    BBSIZ = OFF	; 1kW boot block size
    XINST = Off	; Instruction set extension and Indexed Addressing mode enabled
    Cp0 = OFF	; Block 0 code-protected
    CP1 = OFF ; Block 1 (002000-003FFFh) code-protected
    CPB = OFF ; Boot block (000000-0007FFh) code-protected
    CPD = OFF ; Data EEPROM code-protected
    WRT0 = OFF ; Block 0 (000800-001FFFh) not write-protected
    WRT1 = OFF ; Block 1 (002000-003FFFh) not write-protected
    WRTB = OFF ; Boot block (000000-0007FFh) not write-protected
    WRTC = OFF ; Configuration registers (300000-3000FFh) 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
    EBTRB = OFF ; Boot block (000000-0007FFh) not protected from table reads executed in other blocks
Config_End

            '  76543210        
OSCCON      = %01110000 ' 16MHz, Internal oscillator  ' Bit 1 en 0 moeten allebei op 0 staan om PPL te KUNNEN activeren.
OSCTUNE.6   = 1         ' Daadwerkelijk PLL activeren.

All_Digital TRUE          ;Alle ingangen digitaal

            ;  76543210
PORTA       = %00000000 
PORTB       = %00000000 
PORTC       = %00000000 

TRISA       = %00000000 
TRISB       = %00000000 
TRISC       = %00000000  


DelayMS 500 ' PIC laten rusten voor opstarten..

PORTC.2 = 1 ' Poort van de Piezo buzzer..

DelayMS 2000
  
Main:


   PORTC.1 = 1
        
GoTo Main

End