heat control  r71
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
lcdisp.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <util/delay.h>
#include "lcdisp.h"
#include "lcd_lib.h"
#include "setup.h"
Include dependency graph for lcdisp.c:

Go to the source code of this file.

Functions

void LcdInit (void)
 display initialization Alphanumeric LCD initialization Connections are specified in the Project|Configure|C Compiler|Libraries|Alphanumeric LCD menu: RS - PORTA Bit 0 RD - PORTA Bit 1 EN - PORTA Bit 2 D4 - PORTA Bit 4 D5 - PORTA Bit 5 D6 - PORTA Bit 6 D7 - PORTA Bit 7 Characters/line: 16 More...
 
void WriteMeasVal (MEASVAL *mv)
 put a measurement value on lcd source value is being output as fixed decimal point number More...
 
void WriteValue (MEASVAL *mv)
 write the payload value itself onto lcd while considering the data type More...
 
void WriteSetupValue (SETUP_ITEM *si, UCHAR allow, UCHAR id)
 put a setup item on screen, which consist of a name and a value spread over two lines More...
 
void WriteSetupGroup (UCHAR grp)
 
void WriteCtrlMode (UCHAR name, UCHAR *cmName)
 
void ntofa (UINT val, UCHAR *buf, DATTYPE dt)
 convert integer value to fixed decimal point string buffer must have at least a size of 8 bytes allocated More...
 
UINT _exp10 (UCHAR n)
 
void Welcome (void)
 put startup info on screen
More...
 

Function Documentation

UINT _exp10 ( UCHAR  n)

calculate the exponential to base 10

Parameters
nnumber to calculate the exponential for
Returns
result of exponential to base 10

Definition at line 201 of file lcdisp.c.

References NUM_BASE, NUM_SDG, UCHAR, and UINT.

Referenced by ntofa().

Here is the caller graph for this function:

void LcdInit ( void  )

display initialization Alphanumeric LCD initialization Connections are specified in the Project|Configure|C Compiler|Libraries|Alphanumeric LCD menu: RS - PORTA Bit 0 RD - PORTA Bit 1 EN - PORTA Bit 2 D4 - PORTA Bit 4 D5 - PORTA Bit 5 D6 - PORTA Bit 6 D7 - PORTA Bit 7 Characters/line: 16

Definition at line 23 of file lcdisp.c.

References LCDclr(), LCDinit(), and Welcome().

Referenced by Init().

Here is the call graph for this function:

Here is the caller graph for this function:

void ntofa ( UINT  val,
UCHAR buf,
DATTYPE  dt 
)

convert integer value to fixed decimal point string buffer must have at least a size of 8 bytes allocated

Parameters
valvalue being converted
bufbuffer for the conversion result
dtdata type to convert to

Definition at line 133 of file lcdisp.c.

References _exp10(), ALNUM_BASE, BR_DBDP, DF_DECPT, DT_CHAR, DT_INT, DT_TIME, DT_UCHAR, NUM_LEN, UCHAR, UINT, and VALUE_LENGTH.

Referenced by WriteValue().

Here is the call graph for this function:

Here is the caller graph for this function:

void Welcome ( void  )

put startup info on screen

  • project name
  • revision or version number
  • vendor's name

Definition at line 225 of file lcdisp.c.

References FW_REV, LCDclr(), LCDGotoXY(), LCDstring(), and UCHAR.

Referenced by LcdInit().

Here is the call graph for this function:

Here is the caller graph for this function:

void WriteCtrlMode ( UCHAR  name,
UCHAR cmName 
)

puts the control mode onto screen and gives it a name

Parameters
nameof the control mode (of meas value)
cmNamehrf control mode

Definition at line 117 of file lcdisp.c.

References LCDGotoXY(), LCDsendChar(), LCDstring(), and UCHAR.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void WriteMeasVal ( MEASVAL mv)

put a measurement value on lcd source value is being output as fixed decimal point number

Parameters
mvmeasurement value to extract values to put on screen from

Definition at line 34 of file lcdisp.c.

References LCD_POS::col, LCDGotoXY(), LCDsendChar(), MEASVAL::name, MEASVAL::pos, LCD_POS::row, and WriteValue().

Referenced by PrintValue().

Here is the call graph for this function:

Here is the caller graph for this function:

void WriteSetupGroup ( UCHAR  grp)

puts the hrf setup group onto screen

Parameters
grpencoded group to resolve to hrf and print

Definition at line 95 of file lcdisp.c.

References LCDGotoXY(), LCDstring(), POS_GRP_START, SG_CTRL, SG_LIMIT, SG_MEAS, and UCHAR.

Referenced by DoSetup().

Here is the call graph for this function:

Here is the caller graph for this function:

void WriteSetupValue ( SETUP_ITEM si,
UCHAR  allow,
UCHAR  id 
)

put a setup item on screen, which consist of a name and a value spread over two lines

Parameters
sisetup item to print
allowflag to allow (TRUE) or disallow (FALSE) writing - this reflects the currently selected item to the user by flashing
idof the position in data array, used for position determination on screen

Definition at line 72 of file lcdisp.c.

References MEASVAL::dt, LCDGotoXY(), LCDstring(), SETUP_ITEM::name, POS_1ST_NAME, POS_1ST_VAL, POS_2ND_NAME, POS_2ND_VAL, SETUP_ITEM::type, UCHAR, SETUP_ITEM::value, MEASVAL::value, and WriteValue().

Referenced by PrintPage().

Here is the call graph for this function:

Here is the caller graph for this function:

void WriteValue ( MEASVAL mv)

write the payload value itself onto lcd while considering the data type

Parameters
mvencapsulated measurement value to put on screen

Definition at line 44 of file lcdisp.c.

References MEASVAL::dt, DT_CHAR, DT_FLOAT, DT_INT, DT_TIME, DT_UCHAR, DT_UINT, LCDstring(), ntofa(), UCHAR, MEASVAL::value, and VALUE_LENGTH.

Referenced by WriteMeasVal(), and WriteSetupValue().

Here is the call graph for this function:

Here is the caller graph for this function: