Documentation for project debounce.prj

Basic18 Documentation Generator V 1.0

Index

Project Information

Project Path C:\Eric\vb\Projects\Bas18a3\programs\Examples3\ButtonDebounce\debounce.prj
Processor: 18F452
Oscillator: 4MHz

Included files:


Button Debouncing example

Simply count button presses and display the total on an LCD

This program works with the ICD2 Demo board

PORTB pin 0 is pulled high with a 10K resistor and switched
low with the button

LCD data bits 4, 5, 6, 7 connected to PORTD bits 4, 5, 6, 7
LCD E on PORTA bit 1
LCD RW on PORTA bit 2
LCD RS on PORTA bit 3

Procedures called by global

Procedures that call global

To Index

Call Tree

Procedure Index

User Procedures

Library Procedures

Sub LCDINIT

Initialize the LCD module. The following variables MUST be defined in their proper places before using these routines

Size in Bytes: 134
Number of Parameters: 0
Local Variables: 0
Deepest Stack Level: 2

Procedures called by LCDINIT

Procedures that call LCDINIT

To Index

Sub LCDWRITENIBBLE

Write a nibble to the LCD module.

Size in Bytes: 58
Number of Parameters: 1
Local Variables: 1
Deepest Stack Level: 5

Parameters:

Name
Type
Description
WREGUBYTE
Write the upper 4 bits of this parameter to the LCD

Procedures that call LCDWRITENIBBLE

To Index

Sub LCDWRITE

Write a Byte To the LCD

Size in Bytes: 26
Number of Parameters: 1
Local Variables: 1
Deepest Stack Level: 4

Parameters:

Name
Type
Description
WREGUBYTE
Write this value To the LCD module

Procedures called by LCDWRITE

Procedures that call LCDWRITE

To Index

Function LCDREAD

Read a byte from the LCD module

Size in Bytes: 124
Number of Parameters: 0
Local Variables: 1
Deepest Stack Level: 5

Return Variables:

Name
Type
Description
RETUBYTE The byte read from the LCD module

Procedures that call LCDREAD

To Index

Sub LCDWAIT

Wait on the last command to finish executing on the LCD

Size in Bytes: 24
Number of Parameters: 0
Local Variables: 1
Deepest Stack Level: 4

Procedures called by LCDWAIT

Procedures that call LCDWAIT

To Index

Sub LCDPUTC

Display a character on the LCD

Size in Bytes: 12
Number of Parameters: 1
Local Variables: 0
Deepest Stack Level: 3

Parameters:

Name
Type
Description
WREGUBYTE
The value to displayed on the LCD

Procedures called by LCDPUTC

Procedures that call LCDPUTC

To Index

Sub LCDPUTI

Write an instruction to the LCD

Size in Bytes: 12
Number of Parameters: 1
Local Variables: 0
Deepest Stack Level: 3

Parameters:

Name
Type
Description
WREGUBYTE
The instruction to send to the LCD

Procedures called by LCDPUTI

Procedures that call LCDPUTI

To Index

Sub LCDPUTS

Display a string on the LCD

Size in Bytes: 26
Number of Parameters: 1
Local Variables: 0
Deepest Stack Level: 2

Parameters:

Name
Type
Description
SSTRING
The string to displayed on the LCD

Procedures called by LCDPUTS

Procedures that call LCDPUTS

To Index

Sub LCDCLS

Clear the LCD display

Size in Bytes: 8
Number of Parameters: 0
Local Variables: 0
Deepest Stack Level: 2

Procedures called by LCDCLS

Procedures that call LCDCLS

To Index

Sub WAITFORBUTTON

Size in Bytes: 94
Number of Parameters: 3
Local Variables: 4
Deepest Stack Level: 1

Parameters:

Name
Type
Description
PORTUINTEGER
?
PINUBYTE
?
WREGUBYTE
?

Procedures called by WAITFORBUTTON

Procedures that call WAITFORBUTTON

To Index

Function ISBUTTONHIGH

Size in Bytes: 72
Number of Parameters: 2
Local Variables: 5
Deepest Stack Level: 2

Parameters:

Name
Type
Description
PORTUINTEGER
?
WREGUBYTE
?

Return Variables:

Name
Type
Description
RETUBYTE
?

Procedures called by ISBUTTONHIGH

Procedures that call ISBUTTONHIGH

To Index

Function ISBUTTONLOW

Size in Bytes: 74
Number of Parameters: 2
Local Variables: 5
Deepest Stack Level: 2

Parameters:

Name
Type
Description
PORTUINTEGER
?
WREGUBYTE
?

Return Variables:

Name
Type
Description
RETUBYTE
?

Procedures called by ISBUTTONLOW

Procedures that call ISBUTTONLOW

To Index

Function CREATEMASK

Size in Bytes: 32
Number of Parameters: 2
Local Variables: 2
Deepest Stack Level: 3

Parameters:

Name
Type
Description
PORTUINTEGER
?
WREGUBYTE
?

Return Variables:

Name
Type
Description
WREGUBYTE
?

Procedures called by CREATEMASK

Procedures that call CREATEMASK

To Index

Sub MAIN

Size in Bytes: 56
Number of Parameters: 0
Local Variables: 0
Deepest Stack Level: 0

Procedures called by MAIN

To Index

Sub UPDATEDISPLAY

Update the LCD display

Size in Bytes: 95
Number of Parameters: 0
Local Variables: 2
Deepest Stack Level: 1

Local Variables:

Name
Type
Description
SSTRING
Temporary string

Procedures called by UPDATEDISPLAY

Procedures that call UPDATEDISPLAY

To Index

Sub INIT

Initialize hardware and software ADC Configuration ================= Processor: 18F452 Fosc: Fosc/32 Channel: 0 ADC: ON Justify: Right Analog Channels: AN0 Digital Channels: AN1,AN2,AN3,AN4,AN5,AN6,AN7 Verf+: Vdd Vref-: Vss

Size in Bytes: 18
Number of Parameters: 0
Local Variables: 0
Deepest Stack Level: 1

Procedures called by INIT

Procedures that call INIT

To Index

Sub STR

Size in Bytes: 124
Number of Parameters: 2
Local Variables: 0
Deepest Stack Level: 2

Parameters:

Name
Type
Description
BINULONG
?
SSTRING
?

Procedures called by STR

Procedures that call STR

To Index

Sub BCD2A

Size in Bytes: 78
Number of Parameters: 1
Local Variables: 2
Deepest Stack Level: 3

Parameters:

Name
Type
Description
SSTRING
?

Procedures that call BCD2A

To Index

Sub B2BCD

Size in Bytes: 108
Number of Parameters: 2
Local Variables: 3
Deepest Stack Level: 3

Parameters:

Name
Type
Description
BINULONG
?
SSTRING
?

Procedures that call B2BCD

To Index

Sub ASSIGNCSTRING16

Size in Bytes: 34
Number of Parameters: 0
Local Variables: 0
Deepest Stack Level: 2

Procedures that call ASSIGNCSTRING16

To Index

Sub DLY2

Size in Bytes: 24
Number of Parameters: 2
Local Variables: 0
Deepest Stack Level: 3

Parameters:

Name
Type
Description
D1UBYTE
?
D2UBYTE
?

Procedures that call DLY2

To Index

Function LSL1

Size in Bytes: 14
Number of Parameters: 2
Local Variables: 1
Deepest Stack Level: 4

Parameters:

Name
Type
Description
VALUBYTE
?
WREGUBYTE
?

Return Variables:

Name
Type
Description
WREGUBYTE
?

Procedures that call LSL1

To Index