CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

ccs rev 9 prototyping board help
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
tienguan



Joined: 06 Jan 2011
Posts: 12

View user's profile Send private message

ccs rev 9 prototyping board help
PostPosted: Thu Jan 06, 2011 9:44 am     Reply with quote

I am using prototyping board and I am trying to use it to test keypad input and display on lcd display. I have tried simulation part (proteus) but having trouble how to use this prototyping board.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jan 06, 2011 2:23 pm     Reply with quote

We don't know what board you have. Post a link to the webpage for it.

Also, we don't know what drivers and example programs you are using for the lcd and keypad.

Also post your compiler version.
tienguan



Joined: 06 Jan 2011
Posts: 12

View user's profile Send private message

PostPosted: Sun Jan 09, 2011 9:02 am     Reply with quote

http://www.ccsinfo.com/product_info.php?products_id=ACEdevkit
I am using this prototyping board

My schematic layout
My problem is to implement this schematic layout into the prototyping board.
I know how to load it but not sure how to connect the components into the prototyping board.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jan 09, 2011 5:51 pm     Reply with quote

Post your schematic on a free image hosting website such as
imageshack.com and then post a link to it here.
tienguan



Joined: 06 Jan 2011
Posts: 12

View user's profile Send private message

PostPosted: Mon Jan 10, 2011 1:59 pm     Reply with quote

http://img3.imageshack.us/i/79418846.png/

my schematic.

what kind of components do i need?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jan 10, 2011 2:38 pm     Reply with quote

Do you have the CCS keypad and LCD ? Item 9 in this diagram shows
the keypad and LCD are plugged into connectors on the ACE board:
http://www.ccsinfo.com/pdfs/product_PDFs/ACE_kit.pdf
tienguan



Joined: 06 Jan 2011
Posts: 12

View user's profile Send private message

PostPosted: Tue Jan 11, 2011 2:50 am     Reply with quote

Yes, I got the keypad and the lcd display module.

I real problem is how to connect the first three pins of the LCD module.

How do I connect the Vee? Do i connect it to +5V in the board? Do i need the 100k resistor?

What I did was connect the Vdd and Vee to +5V and Vss to the ground, which doesnt seem to work at all. Crying or Very sad
tienguan



Joined: 06 Jan 2011
Posts: 12

View user's profile Send private message

PostPosted: Tue Jan 11, 2011 2:55 am     Reply with quote

Forgot to tell you that my LCD is not connected directly to the board like the pdf file suggested. I am using port C instead of the default port (port B)
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Tue Jan 11, 2011 3:11 am     Reply with quote

Read the data sheet for _your_ LCD.

Vee, is most definitely _not_ designed to connect to 5v. It is a bias voltage for the LCD. Depending on the LCD, it may need a voltage between a few volts negative, up to perhaps the supply rail. (many modern LCD's are setup to give a 'reasonable' output at 0v), few modern units will give _any_ output, if this is connected to 5v. Historically older displays usually needed a -ve voltage here, but few now do.
So, read the data sheet, and see what your LCD wants. I'd suspect that connecting Vee, to 0v, might well give you a display.

Best Wishes
tienguan



Joined: 06 Jan 2011
Posts: 12

View user's profile Send private message

PostPosted: Tue Jan 11, 2011 9:47 am     Reply with quote

Do I need the 100k resistor?
How do I connect to 0V?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jan 11, 2011 11:30 am     Reply with quote

You can get 0v by connected the Vee pin to ground. On your schematic
it's the symbol that looks like this:
Code:

  |
  |
-----
 ---
  -
tienguan



Joined: 06 Jan 2011
Posts: 12

View user's profile Send private message

PostPosted: Wed Jan 12, 2011 10:02 pm     Reply with quote

The LCD is definitely on but it's not working as I hoped for. The keypad doesn't seem to able to enter any numbers and the LCD is displaying weird numbers randomly. I suspect it's because of my code.

Here's my code:
Code:

#if defined(__PCH__)
#include <18F4620.h>
#endif

#device ICD=TRUE
#fuses HS,NOLVP,NOWDT,NOPROTECT
#use delay (clock=20000000)

#define LCD_RS_PIN      PIN_C0                                     
#define LCD_RW_PIN      PIN_C1
#define LCD_ENABLE_PIN  PIN_C2
#define LCD_DATA4       PIN_C4                               
#define LCD_DATA5       PIN_C5                                   
#define LCD_DATA6       PIN_C6                                   
#define LCD_DATA7       PIN_C7                                   

#include "flex_lcd.c"
#include <kbd.c>

void main() {
   char c;

   lcd_init();
   kbd_init();

   lcd_putc("\fKeypad Testing..\n");
   
   delay_ms(100);
   
   while (TRUE) {
      c=kbd_getc();
      if(c!=0)
        if(c=='*')
          lcd_putc('\f');
        else
          lcd_putc(c);
   }
}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jan 13, 2011 12:57 pm     Reply with quote

Quote:
Yes, I got the keypad and the lcd display module.

Does this mean you have the "official" CCS keypad and LCD that they
sell for the ACE kit ? This one:
http://www.ccsinfo.com/product_info.php?cPath=Store&products_id=lcdkeypad

If you those parts, they should just plug right into the ACE Kit board
with no problem.

Quote:
The real problem is how to connect the first three pins of the LCD module

I don't have the ACE kit, and CCS does not post the PDF file for the
manual and the schematic on their website. But I would assume that
the ACE kit has all the connections for the LCD "pre-wired" and correct.
The photo of the LCD in the link above shows a resistor soldered on the
top side of the LCD, near the connector pins. I assume this is for the
LCD contrast circuit. Why do you believe you have to make additional
connections to the LCD ?

If you actually bought the ACE kit and the CCS LCD and keypad
and it doesn't work, then you should email CCS about it.
tienguan



Joined: 06 Jan 2011
Posts: 12

View user's profile Send private message

PostPosted: Fri Jan 14, 2011 1:09 pm     Reply with quote

LCD and keypad problems are solved.
I need to know what's wrong with my code.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jan 14, 2011 1:35 pm     Reply with quote

Quote:

The keypad doesn't seem to able to enter any numbers and the LCD is
displaying weird numbers randomly.

I think the problem is in the hardware. I just looked at your full
schematic (yesterday it didn't show the whole thing. But today I can see it all).
There's a problem with your keypad circuit. You have pull-up resistors
on the column pins of the keypad. That's wrong. They are supposed to
be on the Row pins. You need one pull-up on each row pin.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group