Demon
- 12th January 2012, 06:46
Hi all,
I started playing around with the 18F4550, read all the threads I could find on USB, triple-checked the configs, made sure DEFINES were in caps, but now I'm stumped on the most basic operation.
- 18F4550 with 20MHz crystal
- Lab X1 experimental board powered by wall adapter
- PBP 2.60C
- MicroCode Studio Plus v2.2.1.1
- MPLAB MPASM
ASM ; 18F4550, 20mhz crystal
__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
__CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H
__CONFIG _CONFIG2L, _PWRT_OFF_2L & _BOR_ON_2L & _VREGEN_ON_2L
__CONFIG _CONFIG2H, _WDT_OFF_2H
__CONFIG _CONFIG3H, _CCP2MX_OFF_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVREN_OFF_4L & _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L
ENDASM
DEFINE OSC 48
DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTE
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTE
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
TRISD = 0
TRISE = 0
PAUSE 1000
LCDOUT $FE,1,"LabX1 18F4550"
end
Nothing comes out on the LCD.
The LCD works fine, I used it for the Lab X1 examples I just added in Code Examples. I can get LEDs to blink back and forth, so I know the PIC can be programmed properly, but that's about it.
(gets ready for point-and-laugh session)
Robert
:(
I started playing around with the 18F4550, read all the threads I could find on USB, triple-checked the configs, made sure DEFINES were in caps, but now I'm stumped on the most basic operation.
- 18F4550 with 20MHz crystal
- Lab X1 experimental board powered by wall adapter
- PBP 2.60C
- MicroCode Studio Plus v2.2.1.1
- MPLAB MPASM
ASM ; 18F4550, 20mhz crystal
__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
__CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H
__CONFIG _CONFIG2L, _PWRT_OFF_2L & _BOR_ON_2L & _VREGEN_ON_2L
__CONFIG _CONFIG2H, _WDT_OFF_2H
__CONFIG _CONFIG3H, _CCP2MX_OFF_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVREN_OFF_4L & _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L
ENDASM
DEFINE OSC 48
DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTE
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTE
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
TRISD = 0
TRISE = 0
PAUSE 1000
LCDOUT $FE,1,"LabX1 18F4550"
end
Nothing comes out on the LCD.
The LCD works fine, I used it for the Lab X1 examples I just added in Code Examples. I can get LEDs to blink back and forth, so I know the PIC can be programmed properly, but that's about it.
(gets ready for point-and-laugh session)
Robert
:(