Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

Sort By

USER REQUESTS

first | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 last
iverson nair
iverson

posted on 2013/05/14 09:57:56 AM CEST

Graphics & LCD

displaying different messages on 16x2 lcd with pic16f628a

hi
im trying to display different messages when push button is depressed. the program buids in mikro c but when connected
the message to be displayed when switch is depressed comes up even if the swith is off can any one helpsource code is below

//HEADER*******************************************************************************

// LCD module connections
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



// Define Messages
char text1[] = "test 1";
char text2[] = "lcd on";
char text3[] = "test 2";
char text4[] = "good";
char text5[] = "test 3 ";
char text6[] = "fine";
char text7[] = "test5";
char text8[] = "good";
char text9[] = "test 7";
char text10[] = "good";
char text11[] = "test 8";
char text12[] = "good";
char text13[] = "test9";




void main() {
CMCON |= 7; // Disable Comparators
TRISB = 0;
PORTB = 0;
Lcd_Init();
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
PORTA = 255;
TRISA = 255;




Lcd_Init(); // Initialize LCD
do {
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1,1,text1); // Write message1 in 1st row
Lcd_Out(2,1,text2); // Write message1 in 2nd row
Delay_ms(1000); // delay 3s
Lcd_Cmd(_LCD_CLEAR); // Clear display
Delay_ms(1000); // delay 1s
Lcd_Out(1,1,text1); // Write message3 in 1st row
Lcd_Out(2,1,text4);
Delay_ms(8000); // delay 15S
} while(0);

if(Button(&PORTA,3,1,1))

Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1,1,text5); // Write message1 in 1st row
Lcd_Out(2,1,text6); // Write message1 in 2nd row
Delay_ms(3000); // WAIT 3 SEC
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1,1,text1); // Write message1 in 1st row
Lcd_Out(2,1,text7); // Write message1 in 2nd row
Delay_ms(15000);

while(1);

}

Mohammad Hamudeh
Mohammad Hamudeh

posted on 2013/04/25 11:24:38 AM CEST

Graphics & LCD

pulse counter

I need a code for pulse counter using PIC 16F877a notice that pulses have not uniform frequencies ,so that i need to count pulses amplitude and display the counter in LCD
thanks

Simon Duke
SimonD

posted on 2013/04/24 04:13:36 AM CEST

Graphics & LCD

Menu Navigation with Incremental Encoder and Push Button in BASIC

I think that is very useful for many people as a guide to save time in their projects. Some ideas:: LCD and TFT indications, Multilingual choice, Floating Point changing values, a buzzer to beep in every step etc.

Philip Newman
Equipment

posted on 2013/03/26 10:07:16 AM CET

Graphics & LCD > TFT

TFT Button to turn on LED

Do you have any examples in Visual TFT where a button is created so that when the ondown event turns on a LED and the onup event turns the LED off. I am using a Pic32MX795F512L chip on a EasyPic Fusion V7 development board.

Ruud Kerstens
Resistorman

posted on 2013/03/23 02:00:43 PM CET

Graphics & LCD

8x8 click module Micropascal and AVR

Hi,

All examples I find here are for PIC or ARM, but sofar no luck for AVR. Anybody able to recode this? Or Mikroe, can you also supply these examples?

first | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 last