| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| __SIMS 
 
 
 Joined: 23 Mar 2006
 Posts: 1
 
 
 
			    
 
 | 
			
				| PIC18F8722 help; nothing happening |  
				|  Posted: Thu Mar 23, 2006 9:27 am |   |  
				| 
 |  
				| I am having trouble getting any output on my LED when using the PIC18F8722... please help: 
 
 #include <18F8722.h>
 #include "FLEX_LCD420.C"
 
 void main()
 {
 
 lcd_init();
 
 while(1)
 {
 output_high(PIN_F2);
 delay_ms(1000);
 output_low(PIN_F2);
 
 printf(lcd_putc, "Hello World.");
 lcd_putc("f");
 
 delay_ms(1000);
 }
 }
 
 The only change I made to the FLEX_LCD420.c was to change the appropriate pin connections I am using:
 
 #define LCD_DB4   PIN_F4
 #define LCD_DB5   PIN_F5
 #define LCD_DB6   PIN_F6
 #define LCD_DB7   PIN_F7
 
 #define LCD_E     PIN_F2
 #define LCD_RS    PIN_F0
 #define LCD_RW    PIN_F1
 |  | 
	
		|  | 
	
		| PCM programmer 
 
 
 Joined: 06 Sep 2003
 Posts: 21708
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Fri Mar 24, 2006 12:47 am |   |  
				| 
 |  
				| That's [spam]'s code.   He's going to have to support it. Just letting you know.
 |  | 
	
		|  | 
	
		| vitorego 
 
 
 Joined: 18 Apr 2006
 Posts: 3
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Tue Apr 18, 2006 5:26 pm |   |  
				| 
 |  
				| The flexible lcd code also works with powertip LCD modules with 16x2 and 5*8 dots? I canīt configure this LCD manually with function sets and all this things.
 |  | 
	
		|  | 
	
		| noisepic 
 
 
 Joined: 24 Jul 2005
 Posts: 20
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Fri May 05, 2006 8:03 pm |   |  
				| 
 |  
				| I have used flex_lcd.c for Pic16F877A but it doesn't working. I don't know why. I used PORTB RS PIN_B2
 E   PIN_B3
 D4-D7 PIN_B4-PIN_B7
 
 help me pls? or another code!!
 |  | 
	
		|  | 
	
		| Mark 
 
 
 Joined: 07 Sep 2003
 Posts: 2838
 Location: Atlanta, GA
 
 
			      
 
 | 
			
				|  |  
				|  Posted: Sat May 06, 2006 8:44 am |   |  
				| 
 |  
				| Did you remember to include NOLVP in your fuses? |  | 
	
		|  | 
	
		| fuzzy 
 
 
 Joined: 26 Feb 2005
 Posts: 64
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Sun Jun 04, 2006 5:07 am |   |  
				| 
 |  
				| Hi, 
 could you please tell me how can i write a variable value on this kind of LCD with these drivers??
 |  | 
	
		|  | 
	
		| Mark 
 
 
 Joined: 07 Sep 2003
 Posts: 2838
 Location: Atlanta, GA
 
 
			      
 
 | 
			
				|  |  
				|  Posted: Sun Jun 04, 2006 8:16 am |   |  
				| 
 |  
				| lcd_putc() will display a single char. You can redirect the printf command to the LCD by supplying this function name as the first parameter of the printf.  Look at the help for printf to see an example.
 |  | 
	
		|  | 
	
		| TheNewHetfield 
 
 
 Joined: 13 Jun 2006
 Posts: 1
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Mon Jun 26, 2006 4:05 pm |   |  
				| 
 |  
				| It's a very useful code!! 
 I'm using it in a huge project, needing to optimize the use of the ports, and this code has become an excelent solution
 
 Greetings from Santiago de Chile
 Sergio
 |  | 
	
		|  | 
	
		| pdswar 
 
 
 Joined: 18 Jul 2006
 Posts: 33
 Location: Maryland, USA
 
 
			    
 
 | 
			
				| how can I modify flex_lcd.c to drive NKK Smartswitch LCD |  
				|  Posted: Tue Jul 18, 2006 7:18 am |   |  
				| 
 |  
				| I am a beginner to PIC programming and I am using PIC 18F6722 to drive NKK Smartswitch LCD. 
 http://www.nkksmartswitch.com/PDF/IS01NCF.pdf?
 
 // As defined in the following structure the pin connection of Port F is as
 // follows:
 //     F0  rs
 //     F1  rw
 //     F2  enable
 //     F3  LCD_LP
 //     F4  LCD_DOUT
 //     F5  LCD_BL
 //     Pins F6 and F7 are not connected
 
 How can I modify flex_lcd.c to drive 36 X 24 pixel NKK Smartswitch LCD
 |  | 
	
		|  | 
	
		| treitmey 
 
 
 Joined: 23 Jan 2004
 Posts: 1094
 Location: Appleton,WI   USA
 
 
			      
 
 |  | 
	
		|  | 
	
		| javi.ar 
 
 
 Joined: 17 Feb 2006
 Posts: 59
 Location: Argentina
 
 
			          
 
 | 
			
				| Ignorance |  
				|  Posted: Thu Jul 20, 2006 1:52 pm |   |  
				| 
 |  
				| Sorry about this silly question but can anyone explain what are the meaning of this line 
 output_bit(LCD_DB4, !!(nibble & 1));
 
 i think is putting on the PIN (#define LCD_DB4   PIN_D0) D0 one bit, so far so good, but what is !!, I cannot find out why do you need twice negative (nibble & 1) which I think is always the LSB of each byte...
 
 Please clarify, and thanks in advance.
 |  | 
	
		|  | 
	
		| PCM programmer 
 
 
 Joined: 06 Sep 2003
 Posts: 21708
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Jul 20, 2006 2:16 pm |   |  
				| 
 |  
				| There is a note in the source code which explains this: 
  	  | Quote: |  	  | void lcd_send_nibble(int8 nibble) {
 // Note:  !! converts an integer expression
 // to a boolean (1 or 0).
 output_bit(LCD_DB4, !!(nibble & 1));
 output_bit(LCD_DB5, !!(nibble & 2));
 output_bit(LCD_DB6, !!(nibble & 4));
 output_bit(LCD_DB7, !!(nibble & 8));
 
 delay_cycles(1);
 output_high(LCD_E);
 delay_us(2);
 output_low(LCD_E);
 }
 | 
 
 
 The CCS output_bit() function wants the 'value' parameter to be 0 or 1.
 From the CCS manual:
 
  	  | Quote: |  	  | Syntax: output_bit (pin, value)
 
 Parameters:
 Pins are defined in the devices .h file. The actual number is
 a bit address. For example, port a (byte 5) bit 3 would have
 a value of 5*8+3 or 43. This is defined as follows: #define
 PIN_A3 43. Value is a 1 or a 0.
 | 
 
 Doing a double negation (!!) will convert an integer value to a 0 or 1.
 I am giving the output_bit() function what it needs.
 |  | 
	
		|  | 
	
		| jaime 
 
 
 Joined: 25 Nov 2005
 Posts: 56
 Location: Porto - Portugal
 
 
			      
 
 | 
			
				|  |  
				|  Posted: Tue Dec 19, 2006 10:38 am |   |  
				| 
 |  
				| What i need to do to use it with 24x2 display?? 
 Thanks
 |  | 
	
		|  | 
	
		| PCM programmer 
 
 
 Joined: 06 Sep 2003
 Posts: 21708
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Tue Dec 19, 2006 1:21 pm |   |  
				| 
 |  
				|  	  | Quote: |  	  | What i need to do to use it with 24x2 display ? | 
 Give the manufacturer and part number of the 24x2 LCD that you
 want to use.   Post a link to the data sheet.   I'll look at it.
 |  | 
	
		|  | 
	
		| jaime 
 
 
 Joined: 25 Nov 2005
 Posts: 56
 Location: Porto - Portugal
 
 
			      
 
 | 
			
				|  |  
				|  Posted: Tue Dec 19, 2006 1:46 pm |   |  
				| 
 |  
				| In the silkscreen i have: SII L2432 N11V0
 
 There's some info in the net but i cannot find the site of the manufaturer...
 
 Thanks
 
 http://www.eio.com/l2432ap.htm
 |  | 
	
		|  | 
	
		|  |