Hi there, is there anyone have any code for microchip explorer 16 board.Code like displaying the LED or LCD screen on the board, or user defined control of the button or switch.
Thanks..
Originally posted by Lwy2986:Hi there, is there anyone have any code for microchip explorer 16 board.Code like displaying the LED or LCD screen on the board, or user defined control of the button or switch.
Thanks..
I did a quick search and found codes in the 1st minute.
The codes are in C language and I saw a LCD sample file inside together with its header file.
I believe the purpose of this place is to discuss about specific IT problems...programming or otherwise...
Asking for codes for you to cut-and-paste into your project(FYP?) doesnt quite cut it.
Spend the time to understand your hardware and then the codes.I dont think we know the specifics of the hardware that U are going to use.Ask only if you get stuck and see if anyone here can help.
I have did my research and i also have found the led program.is not that i didnt try to understand the hardware. But then i need more sample on the program then i can compare and start up on my program. Im using PIC32MX360L for the explorer 16 board.
Originally posted by Lwy2986:I have did my research and i also have found the led program.is not that i didnt try to understand the hardware. But then i need more sample on the program then i can compare and start up on my program. Im using PIC32MX360L for the explorer 16 board.
The sample that U found...if it has been written for the particular board that U are using...U can load it in and confirm that it works.
if not...looking at the LED sample will tell U how to write the LED function...just change the parameters and load it into the correct address locations...which will come from your hardware manual.put it as a function and call it from void main...if it works...then U have it...if not...try again.
Or rather...do you understand the LED sample codes?
Originally posted by Lwy2986:I have did my research and i also have found the led program.is not that i didnt try to understand the hardware. But then i need more sample on the program then i can compare and start up on my program. Im using PIC32MX360L for the explorer 16 board.
Correct model number?
Search engine has no results.
Got link?
I downloaded the sample codes for dsPIC33F(Explorer 16 Starter Kit) and its quite comprehensive leh...got explanation somemore
just #include the header file and lcd.c and U are good to go.
lcd.c
void lcd_data( char data ) // subroutine for lcd data
{
// TRISD &= 0xFF00; // ensure RD0 - RD7 are outputs
RW = 0; // ensure RW is 0
RS = 1; // assert register select to 1
DATA &= 0xFF00; // prepare RD0 - RD7
DATA |= data; // data byte to lcd
//somemore coding
}
lcd.h
void Init_LCD( void ); // initialize display
void lcd_cmd( char cmd ); // write command to lcd
void lcd_data( char data ); // write data to lcd
void puts_lcd ( unsigned char *data, unsigned char count );
/***** LCD COMMAND FUCNTION PROTOTYPES *****/
#define cursor_right() lcd_cmd( 0x14 )
#define cursor_left() lcd_cmd( 0x10 )
#define display_shift() lcd_cmd( 0x1C )
#define home_clr() lcd_cmd( 0x01 )
#define home_it() lcd_cmd( 0x02 )
#define line_2() lcd_cmd( 0xC0 ) // (0xC0)