I'm using the 18F1320 that comes with the Junebug kit in a breadboard arrangement with Hitachi HD44780 LCD controller and programming it with Swordfish SE.
The Swordfish code is as follow... (From one of the forums)
When I program the PIC, remove and re-connect the power or use the MCLR switch to reset the PIC, it takes roughly 33 seconds before anything happens. In this 33 second waiting time the LCD display has the typical display that a LCD has that is not configured.
Is it a 18F1320 problem or the way that Swordfish makes the HEX file?
The Swordfish code is as follow... (From one of the forums)
Code:
Device = 18F1320
Clock = 8
// some LCD options...
#option LCD_DATA = PORTB.4
#option LCD_RS = PORTB.3
#option LCD_EN = PORTB.2
// import LCD library...
Include "LCD.bas"
Include "convert.bas"
Dim Variable As Word
// Start Of Program...
'Enable MCLR on Pin 4 (RA5)
Config MCLRE = ON
[COLOR="Red"]Config osc = INTIO2[/COLOR] // I had to add this to get the
[COLOR="Red"]OSCCON = $76[/COLOR] // one second timer to work correctly
DelayMS(150) // Let the LCD warm up
LCD.Cls // Clear the LCD screen
LCD.WriteAt(1,1,"Hello World") // Send some text to the LCD
Variable = 0 // Clear the "Variable" register
While True
Inc(Variable) // Decrement the "Var1" register
// Convert to a string,
// and always display 5 characters
LCD.WriteAt(2,1,Convert.DecToStr(Variable,5))
DelayMS(1000) // Delay for 1 second
Wend
When I program the PIC, remove and re-connect the power or use the MCLR switch to reset the PIC, it takes roughly 33 seconds before anything happens. In this 33 second waiting time the LCD display has the typical display that a LCD has that is not configured.
Is it a 18F1320 problem or the way that Swordfish makes the HEX file?