解决温度采集延时问题

This commit is contained in:
2025-11-18 15:40:38 +08:00
parent 4f4a1635ab
commit daa4fd6bd3
12 changed files with 581 additions and 156 deletions

12
IO.C
View File

@@ -188,10 +188,8 @@ void IO_vInit(void)
/// - is used as general input
/// - pull-up device is assigned
/// P1.4:
/// - is used as general purpose output
/// - push/pull output is selected
/// - the pin status is low level
/// - pull device is disabled (tristate)
/// - is used as general input
/// - pull-up device is assigned
/// P1.5:
/// - is used as general input
/// - pull-up device is assigned
@@ -201,13 +199,11 @@ void IO_vInit(void)
/// - the pin status is low level
/// - pull device is disabled (tristate)
SFR_PAGE(_pp1, noSST); // switch to page 1
P1_PUDSEL = 0xFF; // load pullup/pulldown select register
P1_PUDEN = 0xAF; // load pullup/pulldown enable register
P1_PUDEN = 0xBF; // load pullup/pulldown enable register
SFR_PAGE(_pp0, noSST); // switch to page 0
P1_DIR = 0x50; // load direction register
P1_DIR = 0x40; // load direction register
/// -----------------------------------------------------------------------
/// Configuration of Port P2: