EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / Compiler for PIC18f4550

Compiler for PIC18f4550

|

Microcontroller › PIC › need help with an isr code › Compiler for PIC18f4550

January 26, 2017 at 2:45 pm #14378
samarth udgiri
Participant

sbit LCD_RS at RB4_bit;
sbit LCD_EN at Rb5_bit;
sbit LCD_D4 at Rb0_bit;
sbit LCD_D5 at Rb1_bit;
sbit LCD_D6 at Rb2_bit;
sbit LCD_D7 at Rb3_bit;

sbit LCD_RS_Direction at TRISb4_bit;
sbit LCD_EN_Direction at TRISb5_bit;
sbit LCD_D4_Direction at TRISb0_bit;
sbit LCD_D5_Direction at TRISb1_bit;
sbit LCD_D6_Direction at TRISb2_bit;
sbit LCD_D7_Direction at TRISb3_bit;
// End LCD module connections

char txt1[] = "mikroElektronika";
char txt2[] = "EasyPIC6";
char txt3[] = "Lcd4bit";
char txt4[] = "example";

char i;                              // Loop variable

void Move_Delay() {                  // Function used for text moving
 Delay_ms(500);                     // You can change the moving speed here
}

void main(){
//  ANSEL  = 0;                        // Configure AN pins as digital I/O
//  ANSELH = 0;
//  C1ON_bit = 0;                      // Disable comparators
//  C2ON_bit = 0;
 CMCON = 7;             // turn off comparators
 ADCON1 = 0x0F;           // turn off analog inputs

 TRISA = 0x00;
 TRISE = 0x00;                        // PORTB is output
 TRISB = 0x00;

 delay_ms(100);
 Lcd_Init();                        // Initialize LCD

 Lcd_Cmd(_LCD_CLEAR);               // Clear display
 Lcd_Cmd(_LCD_CURSOR_OFF);          // Cursor off
 Lcd_Out(1,6,txt3);                 // Write text in first row

 Lcd_Out(2,6,txt4);                 // Write text in second row
 Delay_ms(2000);
 Lcd_Cmd(_LCD_CLEAR);               // Clear display

 Lcd_Out(1,1,txt1);                 // Write text in first row
 Lcd_Out(2,5,txt2);                 // Write text in second row

 Delay_ms(2000);

 // Moving text
 for(i=0; i<4; i++) {               // Move text to the right 4 times
 Lcd_Cmd(_LCD_SHIFT_RIGHT);
 Move_Delay();
 }

 while(1) {                         // Endless loop
 for(i=0; i<8; i++) {             // Move text to the left 7 times
 Lcd_Cmd(_LCD_SHIFT_LEFT);
 Move_Delay();
 }

 for(i=0; i<8; i++) {             // Move text to the right 7 times
 Lcd_Cmd(_LCD_SHIFT_RIGHT);
 Move_Delay();
 }
 }
}

 

Can anyone tell me the compiler for this code.

i need as soon as possible.

if anyone knows the tell me it will be helpfull for me.

RSS Recent Posts

  • Chinese Tarrifs – 104%!?! May 21, 2025
  • An Update On Tarrifs May 21, 2025
  • Tariff Updates from JLCPCB as of Today May 21, 2025
  • Solar lighting motion detector May 21, 2025
  • Telegram Based Alarm - Sensor cable protection May 20, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise