Searching \ for 'seconds and interrupts' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ints.htm?key=interrupt
Search entire site for: 'seconds and interrupts'.

Truncated match.
PICList Thread
'seconds and interrupts'
1997\11\29@215703 by Tom Sgouros

flavicon
face
Some probably-trivial-but-they-don't-seem-that-way-to-me questions:

Am I misunderstanding something basic when I wonder why you use a
32.768kHz crystal to count seconds with the TIMER1?  Don't 16 bits add
up to 65,536?  (This is from a comment in a microchip app note.) A
subsidiary question here is that I now have a TIMER1 attached to such
a crystal (32k), and it appears to tick at 1.8 seconds: what should I
check first? (I am using 22pF capacitors.)

Second question: What exactly is the problem with CALL statements from
an interrupt function?  Is there any danger to this when the interrupt
is only interrupting sleep?

And finally, and a little off-topic, I have, to my great relief,
finished constructing the protoype of my first project using an LCD.
Now I wonder what is the `real' way to connect my PIC's board to the
little LCD controller board (from Optrex). The LCD board has 14 little
copper pads along its edge, looking for all the world like they were
meant for some connector.  The problem is that I have no idea what
connector or what it's called.  Consulting catalogs has not helped so
far.  Perhaps somebody here can?

Many thanks,

-Tom

---------------------------------------------------------------------
spam_OUTtomssTakeThisOuTspamids.net - 401-861-2831 - 42 Forge Road, Potowomut, RI 02818 USA

1997\11\29@223032 by Herbert Graf

picon face
-----Original Message-----
From: Tom Sgouros <.....tomfoolKILLspamspam@spam@CIRCUS.GSO.URI.EDU>
To: PICLISTspamKILLspamMITVMA.MIT.EDU <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>
Date: Saturday, November 29, 1997 21:59
Subject: seconds and interrupts


>Second question: What exactly is the problem with CALL statements from
>an interrupt function?  Is there any danger to this when the interrupt
>is only interrupting sleep?


   I believe the problem people speak of is if you are in a different page
than from where the call was intended to be issued, meaning you'd jump to a
spot you wouldn't want to. This is just a guess on my part, don't have much
ISR experience. TTYL

1997\11\30@045819 by Leon Heller

flavicon
picon face
In message <EraseME9711300251.AA19460spam_OUTspamTakeThisOuTcircus.gso.uri.edu>, Tom Sgouros
<tomfoolspamspam_OUTCIRCUS.GSO.URI.EDU> writes

[deleted]

>And finally, and a little off-topic, I have, to my great relief,
>finished constructing the protoype of my first project using an LCD.
>Now I wonder what is the `real' way to connect my PIC's board to the
>little LCD controller board (from Optrex). The LCD board has 14 little
>copper pads along its edge, looking for all the world like they were
>meant for some connector.  The problem is that I have no idea what
>connector or what it's called.  Consulting catalogs has not helped so
>far.  Perhaps somebody here can?

Maplin sells snap-off strips of turned-pin plugs and sockets that I have
used to connect an LCD display to a piece of Veroboard in a mother-board
- daughter-board arrangement. The plugs are double-ended - one end is
soldered into the hole in the display, the other end is about the same
size as an IC pin. This is the neatest way I have found of connecting
these displays.

Leon
--
Leon Heller: @spam@leonKILLspamspamlfheller.demon.co.uk http://www.lfheller.demon.co.uk
Amateur Radio Callsign G1HSM    Tel: +44 (0) 118 947 1424
See http://www.lfheller.demon.co.uk/rcm.htm for details of a
low-cost reconfigurable computing module using the XC6216 FPGA

1997\11\30@111340 by Jim Main

flavicon
picon face
In article <KILLspam9711300251.AA19460KILLspamspamcircus.gso.uri.edu>, Tom Sgouros
<RemoveMEtomfoolTakeThisOuTspamCIRCUS.GSO.URI.EDU> writes
>Second question: What exactly is the problem with CALL statements from
>an interrupt function?  Is there any danger to this when the interrupt
>is only interrupting sleep?

If you're in the second program memory code page when there's an
interrupt, then you jump back into page 1 to service the interrupt - the
relevant bit in PCLATH will still be set, so any CALLs or GOTOs in the
interrupt routine will jump down into the second page and get lost.

You just have to remember to save PCLATH in a temporary register, then
set for page 0 before doing any calls/gotos - then restoring pclath at
the end of the interrupt.

This caused me a lot of hairpulling when I had a big prog that jumped
round a lot - and it's not something you find in the Microchip docs..

Jim
--
Jim Main

1997\11\30@122235 by Eric van Es

flavicon
face
Tom Sgouros wrote:

> And finally, and a little off-topic, I have, to my great relief,
> finished constructing the protoype of my first project using an LCD.
> Now I wonder what is the `real' way to connect my PIC's board to the
> little LCD controller board (from Optrex). The LCD board has 14 little
> copper pads along its edge, looking for all the world like they were
> meant for some connector.  The problem is that I have no idea what
> connector or what it's called.  Consulting catalogs has not helped so
> far.  Perhaps somebody here can?

Hi

I've used steel pins (the type one's mother uses for sewing) and soldered
them into those lil' holes. Then one can solder them into a pcb or plug it
into a breadboard/veroboard.

Cheap dirty nasty, but it works.

--
Eric van Es                   | Cape Town, South Africa
spamBeGonevanesspamBeGonespamilink.nis.za | http://www.nis.za/~vanes
LOOKING FOR TEMPORARY / HOLIDAY ACCOMODATION?
http://www.nis.za/~vanes/accom.htm

1997\11\30@195849 by Andrew Mayo

flavicon
face
It'll probably be a standard 0.1" IDC connector - the sort of thing used
for computer disk drives etc. You fit a header to the board and solder
it in, then a female IDC connector and ribbon cable will plug into the
header.

{Quote hidden}


'seconds and interrupts'
2003\11\10@174913 by wizbangdesigns
flavicon
face
I use the dual row 0.1" headers to connect the LCD module to my main
PCB with the PIC. As an aside, check out http://www.crystalfontz.com as a
source for inexpensive (10 or more) LCD modules. I use the 8x2 module
without backlight and the cost is around $5 in qty of 10. Much less
than the Optrex modules from say Digi-Key (where I buy all of my other
parts.) You can see a picture of my design at http://www.wizbangdesigns.com
on the products page. The schematics are available on the downloads
page. This is my first pass at the web site. I'll have much more about
the product design cycle and PICs in general. The schematics and
source for all my projects will be published on the site.

Tom

http://www.wizbangdesigns.com
H-bent on a path towards self-emplyment!




--- In EraseMEpiclist1spamyahoogroups.com, Leon Heller <leon@L...> wrote:
> In message <9711300251.AA19460@c...>, Tom Sgouros
> <tomfool@C...> writes
>
> [deleted]
>
> >And finally, and a little off-topic, I have, to my great relief,
> >finished constructing the protoype of my first project using an
LCD.
> >Now I wonder what is the `real' way to connect my PIC's board to
the
> >little LCD controller board (from Optrex). The LCD board has 14
little
> >copper pads along its edge, looking for all the world like they
were
> >meant for some connector.  The problem is that I have no idea what
> >connector or what it's called.  Consulting catalogs has not helped
so
> >far.  Perhaps somebody here can?
>
> Maplin sells snap-off strips of turned-pin plugs and sockets that I
have
> used to connect an LCD display to a piece of Veroboard in a
mother-board
> - daughter-board arrangement. The plugs are double-ended - one end
is
> soldered into the hole in the display, the other end is about the
same
> size as an IC pin. This is the neatest way I have found of
connecting
> these displays.
>
> Leon
> --
> Leon Heller: leon@l... http://www.lfheller.demon.co.uk
> Amateur Radio Callsign G1HSM    Tel: +44 (0) 118 947 1424
> See http://www.lfheller.demon.co.uk/rcm.htm for details of a
> low-cost reconfigurable computing module using the XC6216 FPGA

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\11\10@182409 by llile

flavicon
face
>As an aside, check out http://www.crystalfontz.com as a
source for inexpensive (10 or more) LCD modules. I use the 8x2 module
without backlight and the cost is around $5 in qty of 10.


What do you like to use asd an LCD driver?  or are these serial interface
modules?


-- Lawrence Lile





wizbangdesigns <RemoveMEtomEraseMEspamEraseMEWIZBANGDESIGNS.COM>
Sent by: pic microcontroller discussion list <RemoveMEPICLISTspam_OUTspamKILLspamMITVMA.MIT.EDU>
11/10/2003 04:36 PM
Please respond to pic microcontroller discussion list


       To:     RemoveMEPICLISTTakeThisOuTspamspamMITVMA.MIT.EDU
       cc:
       Subject:        Re: seconds and interrupts


I use the dual row 0.1" headers to connect the LCD module to my main
PCB with the PIC. As an aside, check out http://www.crystalfontz.com as a
source for inexpensive (10 or more) LCD modules. I use the 8x2 module
without backlight and the cost is around $5 in qty of 10. Much less
than the Optrex modules from say Digi-Key (where I buy all of my other
parts.) You can see a picture of my design at http://www.wizbangdesigns.com
on the products page. The schematics are available on the downloads
page. This is my first pass at the web site. I'll have much more about
the product design cycle and PICs in general. The schematics and
source for all my projects will be published on the site.

Tom

http://www.wizbangdesigns.com
H-bent on a path towards self-emplyment!




--- In EraseMEpiclist1spamspamspamBeGoneyahoogroups.com, Leon Heller <leon@L...> wrote:
> In message <9711300251.AA19460@c...>, Tom Sgouros
> <tomfool@C...> writes
>
> [deleted]
>
> >And finally, and a little off-topic, I have, to my great relief,
> >finished constructing the protoype of my first project using an
LCD.
> >Now I wonder what is the `real' way to connect my PIC's board to
the
> >little LCD controller board (from Optrex). The LCD board has 14
little
> >copper pads along its edge, looking for all the world like they
were
> >meant for some connector.  The problem is that I have no idea what
> >connector or what it's called.  Consulting catalogs has not helped
so
> >far.  Perhaps somebody here can?
>
> Maplin sells snap-off strips of turned-pin plugs and sockets that I
have
> used to connect an LCD display to a piece of Veroboard in a
mother-board
> - daughter-board arrangement. The plugs are double-ended - one end
is
> soldered into the hole in the display, the other end is about the
same
> size as an IC pin. This is the neatest way I have found of
connecting
> these displays.
>
> Leon
> --
> Leon Heller: leon@l... http://www.lfheller.demon.co.uk
> Amateur Radio Callsign G1HSM    Tel: +44 (0) 118 947 1424
> See http://www.lfheller.demon.co.uk/rcm.htm for details of a
> low-cost reconfigurable computing module using the XC6216 FPGA

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\11\10@183616 by Tom Deutschman

flavicon
face
I use either MPASM or CCS C compiler for code development. For the
2-Zone propagation misting timer on my site, I used the CCS C compiler
for all of the code. I have the LCD module (Hitachi controller)
configured for 4-bit interface and I tie the R/W* pin to ground so I am
using delays between commands as opposed to polling the controller. The
code space is about the same but I save on a pin.

Tom Deutschman
http://www.wizbangdesigns.com

The LCD driver module source follows:
-------------------------------------------

////////////////////////////////////////////////////////////////////////
////
////                             LCD.C
////
////                 Driver for common LCD modules
////
////
////
////  lcd_init()   Must be called before any other function.
////
////
////
////  lcd_putc(c)  Will display c on the next position of the LCD.
////
////                     The following have special meaning:
////
////                      \f  Clear display
////
////                      \n  Go to start of second line
////
////                      \b  Move back one position
////
////
////
////  lcd_gotoxy(x,y) Set write position on LCD (upper left is 1,1)
////
////
////
////  lcd_getc(x,y)   Returns character at position x,y on LCD
////
////
////
////                                                            ////
//// *** This code has been modified. Note the following differences:
////
//// --> Uses port A pins for LCD.
////
//// --> Does not read from LCD, RW line tied to logic level.
////
//// --> Read routines removed.                                 ////
//// --> LCD Init string has been modified for my purposes.
////
////                                                            ////
////////////////////////////////////////////////////////////////////////
////
//

//----------------------------------------------------------------------
--------
// Project:     timer2
//
// Description: This is the firmware for the Timer 2 product based on
//              the PIC16F87 microcontroller.
//
// $Log: lcd.c,v $
// Revision 1.2  2003/09/26 21:06:59  tom
// Added CVS header
//
//
//----------------------------------------------------------------------
--------


#define lcd_type 2           // 0=5x7, 1=5x10, 2=2 lines
#define lcd_line_two 0x40    // LCD RAM address for the second line


byte CONST LCD_INIT_STRING[6] = {0x28, 0x0c, 1, 2};
                            // These bytes need to be sent to the LCD
                            // to start it up.


                            // The following are used for setting
                            // the I/O port direction register.


void lcd_send_nibble( byte n ) {

 output_bit(PIN_A0, n & 1);
 output_bit(PIN_A1, n & 2);
 output_bit(PIN_A2, n & 4);
 output_bit(PIN_A3, n & 8);

 delay_us(1);
 output_high(LCD_E);
 delay_us(1);
 output_low(LCD_E);
 delay_us(10);
}


void lcd_send_byte( byte address, byte n ) {

 if (address == 0)
   output_low(LCD_RS);
 else
   output_high(LCD_RS);
 delay_us(1);

 lcd_send_nibble(n >> 4);
 lcd_send_nibble(n & 0xf);
}


void lcd_init() {
 byte i;

 output_low(LCD_RS);
 output_low(LCD_E);
 delay_ms(20);
 lcd_send_nibble(3);
 delay_ms(5);
 lcd_send_nibble(3);
 delay_us(120);
 lcd_send_nibble(3);
 delay_us(10);
 lcd_send_nibble(2);

 for(i = 0; i <= 3; ++i)
   {
     lcd_send_byte(0,LCD_INIT_STRING[i]);
     delay_ms(4);
   }
 delay_ms(5);
}


void lcd_gotoxy( byte x, byte y) {
 int address;

 if (y != 1)
   address = lcd_line_two;
 else
   address = 0;

 address = address + x - 1;

 lcd_send_byte(0, 0x80 | address);
 delay_ms(1);
}

void lcd_putc( char c) {
 switch (c) {
 case '\f'   : lcd_send_byte(0,1); delay_ms(2);    break;
 case '\n'   : lcd_gotoxy(1,2);        break;
 case '\b'   : lcd_send_byte(0,0x10);  break;
 default     : lcd_send_byte(1,c);     break;
 }
}

void lcd_shift_left( byte x )
{
 byte i;
 for (i = 0; i < x; ++i)
       {
     delay_ms(260);
     lcd_send_byte(0,0x18);
       }
}

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...