User manual
mikroPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
119
mikroICD Debugger Example
Here is a step-by-step mikroICD Debugger Example.
First you have to write a program. We will show how the mikroICD works using this example:
program Lcd_Test;
// LCD module connections
var LCD_RS : sbit at LATD0_bit;
var LCD_EN : sbit at LATD1_bit;
var LCD_D4 : sbit at LATB0_bit;
var LCD_D5 : sbit at LATB1_bit;
var LCD_D6 : sbit at LATB2_bit;
var LCD_D7 : sbit at LATB3_bit;
var LCD_RS_Direction : sbit at TRISD0_bit;
var LCD_EN_Direction : sbit at TRISD1_bit;
var LCD_D4_Direction : sbit at TRISB0_bit;
var LCD_D5_Direction : sbit at TRISB1_bit;
var LCD_D6_Direction : sbit at TRISB2_bit;
var LCD_D7_Direction : sbit at TRISB3_bit;
// End LCD module connections
var text : array[16] of char;
i : byte;
begin
ADPCFG := 0xFFFF;
text := ‘mikroElektronika’;
Lcd_Init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_LCD_CURSOR_OFF);
for i := 1 to 17 do
Lcd_Chr(1, i, text[i-1]);
end.