Hi, when i compile the "HID_TEST" example and put code in the PIC18F2550 with a 12Mhz resonator (i have changed PLLDIV to 3) is all ok.
When i add in the code LCD routines:
LCD_Init(PORTB)
the PC give me "Unknow USB ..." , Why? Thanx.
PIC18F2550 and USB problem!!!
What's not working? The example compiles fine by adding LCD_INT():
Code: Select all
main:
df=0
Init_Main
LCD_INIT(PORTB)
HID_Enable(@userRD_buffer, @userWR_buffer)
Delay_mS(1000)
Delay_mS(1000)
'
' rest of example code
'
end.
[color=darkred][b]xor[/b][/color]
[url=http://circuit-ed.com]CircuitED -[/url]
[url=http://circuit-ed.com]CircuitED -[/url]
I stuck my '2550 into my board with the USB_HID program, including the LCD_INIT(), and it shows and works with the HID Terminal program in mBASIC Tools. I'm using mB V4.03.
Are you using a development board? If using the EasyPIC3, be sure your USB jumpers JP7, JP8, and JP9, are set to the right-hand position.
Are you using a development board? If using the EasyPIC3, be sure your USB jumpers JP7, JP8, and JP9, are set to the right-hand position.
[color=darkred][b]xor[/b][/color]
[url=http://circuit-ed.com]CircuitED -[/url]
[url=http://circuit-ed.com]CircuitED -[/url]
-
- Posts: 2
- Joined: 09 Mar 2016 21:45
Re: PIC18F2550 and USB problem!!!
Hi!
I'm an inconsistency in the configuration programming routine LCD. The error appears in red. Will you help me?
Follow the following program:
void config()
{
OSCCON=0b11101110; //programa a freq. interna para 4MH//
LCD_INIT(&PORTB); //Configuração do LCD//
Lcd_Cmd(_LCD_CURSOR_OFF);
TRISC=0b10000000;
INTCON2.f7=0; //configura as resist. de pull up//
TRISB=0b00000011;
escreve_apagando_LCD(1,6,"Hello!");
PORTC=0;
PORTC.f0=1;
ADCON1=0b00001101; //seleciona porta AN0 AN1
TRISA=0b00000011;
max_f=0.0;
media=0.0;
teste_valido=0;
Delay_ms(200); //alterado//
escreve_apagando_LCD(2,9,"Menu-->"); //Mensagem de introdução//
LCD_OUT(1,3,"HandGrip FATEC");
}
I'm an inconsistency in the configuration programming routine LCD. The error appears in red. Will you help me?
Follow the following program:
void config()
{
OSCCON=0b11101110; //programa a freq. interna para 4MH//
LCD_INIT(&PORTB); //Configuração do LCD//
Lcd_Cmd(_LCD_CURSOR_OFF);
TRISC=0b10000000;
INTCON2.f7=0; //configura as resist. de pull up//
TRISB=0b00000011;
escreve_apagando_LCD(1,6,"Hello!");
PORTC=0;
PORTC.f0=1;
ADCON1=0b00001101; //seleciona porta AN0 AN1
TRISA=0b00000011;
max_f=0.0;
media=0.0;
teste_valido=0;
Delay_ms(200); //alterado//
escreve_apagando_LCD(2,9,"Menu-->"); //Mensagem de introdução//
LCD_OUT(1,3,"HandGrip FATEC");
}
- biljana.nedeljkovic
- mikroElektronika team
- Posts: 1043
- Joined: 30 Jun 2015 15:15
Re: PIC18F2550 and USB problem!!!
Hello,
I believe I had answered you here:
http://forum.mikroe.com/viewtopic.php?f=13&t=67193
Kind regards,
Biljana
I believe I had answered you here:
http://forum.mikroe.com/viewtopic.php?f=13&t=67193
Kind regards,
Biljana