SneaKSz
Member
Hi,
when I declare my pins as ouput and I want to illuminate a LED , the output voltage is 1.7V.
I can't see what I'm doing wrong. I've set the bits as digital output.
Someone can see what I'm doing wrong?
Thanks in advance
when I declare my pins as ouput and I want to illuminate a LED , the output voltage is 1.7V.
Code:
//#include <18f14k50.h>
//#include <htc.h>
#include <pic18f1xk50.h>
#define PLLEN = OFF ,
#define CPUDIV = NOCLKDIV ,
#define USBDIV = OFF
#define FOSC = HS
#define FCMEN = OFF
#define IESO = OFF
#define PWRT = ON
#define BOR = ON
#define BORV = 30
#define WDT = OFF
#define WDTPS = 1
#define MCLRE = ON
#define LPT1OSC = OFF
#define STVREN = ON
#define LVP = OFF
#define XINST = OFF // Extended Instruction Set
#define CP0 = ON
#define CP1 = ON
#define CPB = ON
#define WRT0 = ON
#define WRT1 = ON
#define WRTB = ON // Boot Block Write Protection
#define WRTC = OFF
#define EBTR0 = OFF
#define EBTR1 = OFF
#define EBTRB = ON
#define LCD_PORT LATC // ;set constant LEDPORT = 'PORTC'
#define LCD_TRIS TRISC // ;set constant for TRIS register
//volatile bit LCD_RS @ (unsigned)&LATC*8+4;
//;LCD handshake lines
#define LCD_RS LATC4
#define LCD_RW LATC5
#define LCD_E LATC6
void main(void)
{
TRISC = 0; // set PortC all outputs
ANSEL=0x00;
ANSELH=0x00;
WPUB=0x00;
while ( 1)
{
LATC=0b11111111;
}
}
I can't see what I'm doing wrong. I've set the bits as digital output.
Someone can see what I'm doing wrong?
Thanks in advance