Documentation for “Zerocat Dev Kit”
Generated on: Tue, 03 Dec 2024 15:24:37 +0100
Repository: git://zerocat.org/zerocat/projects/zerocat-dev-kit.git
Version: 2117b7b4b
Branch: master

../firmware/src/pins.spin.txt.html

Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.78
Compiling...
../../firmware/src/pins.spin
Done.
Program size is 108 bytes
TYPE: 43   VALUE: 0000001F (00000000)   NAME: PIN_RX
TYPE: 43   VALUE: 0000001E (00000000)   NAME: PIN_TX
TYPE: 43   VALUE: 0000001D (00000000)   NAME: I2C_SDA
TYPE: 43   VALUE: 0000001C (00000000)   NAME: I2C_SCL
TYPE: 43   VALUE: 0000001B (00000000)   NAME: RST_INHIBIT
TYPE: 43   VALUE: 0000001A (00000000)   NAME: RS232_RST
TYPE: 43   VALUE: 00000019 (00000000)   NAME: PIN_D2
TYPE: 43   VALUE: 00000018 (00000000)   NAME: PIN_D1
TYPE: 43   VALUE: 00000017 (00000000)   NAME: IN_A2
TYPE: 43   VALUE: 00000016 (00000000)   NAME: IN_A1
TYPE: 43   VALUE: 00000015 (00000000)   NAME: IN_A0
TYPE: 43   VALUE: 00000014 (00000000)   NAME: IN_D
TYPE: 43   VALUE: 00000010 (00000000)   NAME: ADC_OUT
TYPE: 43   VALUE: 0000000F (00000000)   NAME: ADC_IN
TYPE: 43   VALUE: 0000000E (00000000)   NAME: RC_DECAY2
TYPE: 43   VALUE: 0000000D (00000000)   NAME: RC_DECAY1
TYPE: 43   VALUE: 00000000 (00000000)   NAME: PIN_P0
TYPE: 43   VALUE: 00000001 (00000000)   NAME: PIN_P1
TYPE: 43   VALUE: 00000002 (00000000)   NAME: PIN_P2
TYPE: 43   VALUE: 00000003 (00000000)   NAME: PIN_P3
TYPE: 43   VALUE: 00000004 (00000000)   NAME: PIN_P4
TYPE: 43   VALUE: 00000005 (00000000)   NAME: PIN_P5
TYPE: 43   VALUE: 00000006 (00000000)   NAME: PIN_P6
TYPE: 43   VALUE: 00000007 (00000000)   NAME: PIN_P7
TYPE: 43   VALUE: 00000008 (00000000)   NAME: PIN_P8
TYPE: 43   VALUE: 00000009 (00000000)   NAME: PIN_P9
TYPE: 43   VALUE: 0000000A (00000000)   NAME: PIN_P10
TYPE: 43   VALUE: 0000000B (00000000)   NAME: PIN_P11
TYPE: 43   VALUE: 0000000C (00000000)   NAME: PIN_P12
TYPE: 43   VALUE: 00000011 (00000000)   NAME: PIN_P17
TYPE: 43   VALUE: 00000012 (00000000)   NAME: PIN_P18
TYPE: 43   VALUE: 00000013 (00000000)   NAME: PIN_P19
TYPE: 43   VALUE: 00000000 (00000000)   NAME: MODULE_A
TYPE: 43   VALUE: 00000001 (00000000)   NAME: MODULE_B
TYPE: 43   VALUE: 00000002 (00000000)   NAME: COL_A0
TYPE: 43   VALUE: 00000003 (00000000)   NAME: COL_A1
TYPE: 43   VALUE: 00000004 (00000000)   NAME: COL_A2
TYPE: 43   VALUE: 00000005 (00000000)   NAME: COL_A3
TYPE: 43   VALUE: 00000006 (00000000)   NAME: COL_A4
TYPE: 43   VALUE: 00000007 (00000000)   NAME: COL_A5
TYPE: 43   VALUE: 00000008 (00000000)   NAME: DATA
TYPE: 43   VALUE: 00000009 (00000000)   NAME: ROW_A0
TYPE: 43   VALUE: 0000000A (00000000)   NAME: ROW_A1
TYPE: 43   VALUE: 0000000B (00000000)   NAME: ROW_A2
TYPE: 43   VALUE: 0000000C (00000000)   NAME: ROW_A3
TYPE: 53   VALUE: 00000001 (00000004)   NAME: INI_74HC151
TYPE: 53   VALUE: 00000102 (00000004)   NAME: GET_74HC151
TYPE: 53   VALUE: 00000103 (00000004)   NAME: HIGH
TYPE: 53   VALUE: 00000104 (00000004)   NAME: LOW
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: INVERT_FLAG
TYPE: 4E   VALUE: 00000000 (00000000)   NAME: R
TYPE: 4E   VALUE: 00000008 (00000000)   NAME: ADDR
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: PIN_BIT
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: PIN_BIT

Distilled longs: 0

OBJ bytes: 645

_CLKMODE: 00
_CLKFREQ: 00B71B00

0000- 00 00 5C 00 5C 00 05 00 14 00 00 00 25 00 04 00   ..\.\.......%...
0010- 48 00 00 00 51 00 00 00 37 22 38 17 38 15 3E B4   H...Q...7"8.8.>.
0020- 37 22 38 17 38 15 3E B6 32 37 02 69 35 61 37 02   7"8.8.>.27.i5a7.
0030- 08 19 68 36 ED 69 68 38 17 38 15 3E B4 36 62 43   ..h6.ih8.8.>.6bC
0040- 38 14 3D 92 62 4A 64 62 4B 09 67 32 64 3D D4 1C   8.=.bJdbK.g2d=..
0050- 64 3D D6 1C 32 64 3D D4 18 64 3D D6 1C 32 00 00   d=..2d=..d=..2..
0060- C3 50 49 4E 5F 52 58 10 1F 00 00 00 50 49 4E 5F   .PIN_RX.....PIN_
0070- 54 58 10 1E 00 00 00 49 32 43 5F 53 44 41 10 1D   TX.....I2C_SDA..
0080- 00 00 00 49 32 43 5F 53 43 4C 10 1C 00 00 00 52   ...I2C_SCL.....R
0090- 53 54 5F 49 4E 48 49 42 49 54 10 1B 00 00 00 52   ST_INHIBIT.....R
00A0- 53 32 33 32 5F 52 53 54 10 1A 00 00 00 50 49 4E   S232_RST.....PIN
00B0- 5F 44 32 10 19 00 00 00 50 49 4E 5F 44 31 10 18   _D2.....PIN_D1..
00C0- 00 00 00 49 4E 5F 41 32 10 17 00 00 00 49 4E 5F   ...IN_A2.....IN_
00D0- 41 31 10 16 00 00 00 49 4E 5F 41 30 10 15 00 00   A1.....IN_A0....
00E0- 00 49 4E 5F 44 10 14 00 00 00 41 44 43 5F 4F 55   .IN_D.....ADC_OU
00F0- 54 10 10 00 00 00 41 44 43 5F 49 4E 10 0F 00 00   T.....ADC_IN....
0100- 00 52 43 5F 44 45 43 41 59 32 10 0E 00 00 00 52   .RC_DECAY2.....R
0110- 43 5F 44 45 43 41 59 31 10 0D 00 00 00 50 49 4E   C_DECAY1.....PIN
0120- 5F 50 30 10 00 00 00 00 50 49 4E 5F 50 31 10 01   _P0.....PIN_P1..
0130- 00 00 00 50 49 4E 5F 50 32 10 02 00 00 00 50 49   ...PIN_P2.....PI
0140- 4E 5F 50 33 10 03 00 00 00 50 49 4E 5F 50 34 10   N_P3.....PIN_P4.
0150- 04 00 00 00 50 49 4E 5F 50 35 10 05 00 00 00 50   ....PIN_P5.....P
0160- 49 4E 5F 50 36 10 06 00 00 00 50 49 4E 5F 50 37   IN_P6.....PIN_P7
0170- 10 07 00 00 00 50 49 4E 5F 50 38 10 08 00 00 00   .....PIN_P8.....
0180- 50 49 4E 5F 50 39 10 09 00 00 00 50 49 4E 5F 50   PIN_P9.....PIN_P
0190- 31 30 10 0A 00 00 00 50 49 4E 5F 50 31 31 10 0B   10.....PIN_P11..
01A0- 00 00 00 50 49 4E 5F 50 31 32 10 0C 00 00 00 50   ...PIN_P12.....P
01B0- 49 4E 5F 50 31 37 10 11 00 00 00 50 49 4E 5F 50   IN_P17.....PIN_P
01C0- 31 38 10 12 00 00 00 50 49 4E 5F 50 31 39 10 13   18.....PIN_P19..
01D0- 00 00 00 4D 4F 44 55 4C 45 5F 41 10 00 00 00 00   ...MODULE_A.....
01E0- 4D 4F 44 55 4C 45 5F 42 10 01 00 00 00 43 4F 4C   MODULE_B.....COL
01F0- 5F 41 30 10 02 00 00 00 43 4F 4C 5F 41 31 10 03   _A0.....COL_A1..
0200- 00 00 00 43 4F 4C 5F 41 32 10 04 00 00 00 43 4F   ...COL_A2.....CO
0210- 4C 5F 41 33 10 05 00 00 00 43 4F 4C 5F 41 34 10   L_A3.....COL_A4.
0220- 06 00 00 00 43 4F 4C 5F 41 35 10 07 00 00 00 44   ....COL_A5.....D
0230- 41 54 41 10 08 00 00 00 52 4F 57 5F 41 30 10 09   ATA.....ROW_A0..
0240- 00 00 00 52 4F 57 5F 41 31 10 0A 00 00 00 52 4F   ...ROW_A1.....RO
0250- 57 5F 41 32 10 0B 00 00 00 52 4F 57 5F 41 33 10   W_A2.....ROW_A3.
0260- 0C 00 00 00 49 4E 49 5F 37 34 48 43 31 35 31 00   ....INI_74HC151.
0270- 47 45 54 5F 37 34 48 43 31 35 31 01 48 49 47 48   GET_74HC151.HIGH
0280- 01 4C 4F 57 01                                    .LOW.

______________________________________________________________________________
********************************************************* File starts here ***
Zerocat Dev Kit --- Put the fun back into hardware development!

Copyright (C) 2023  Kai Mertens 

File pins.spin --- Define pins of Propeller 1.

This file is part of Zerocat Dev Kit.

See end of file for terms of use.

******************************************************************************

Object "../../firmware/src/pins" Interface:

PUB  ini_74HC151
PUB  get_74HC151(invert_flag) : 
PUB  high(pin_bit)
PUB  low(pin_bit)

Program:  23 Longs
Variable: 0 Longs


# Objects



# Constants


Note pins 0..8 are fast addressable.


Pins for RS232:

  RS232 RX (Receive from Host) Pin
  RS232 TX (Transmit to Host) Pin

Pins in respect to firmware storage on external EEPROM,
proprietary chip design:

  I2C_SDA           --- I²C Data and Address Line
  I2C_SDL           --- I²C Clock Line

Pins in respect to RST:

  RST_INHIBIT       --- Inhibit RST signal from host
  RS232_RST         --- Sense RST signal from host

Pins for Status LEDs:

  PIN_D2 --- Status LED D2 (orange)
  PIN_D1 --- Status LED D1 (green)

Pins for multiplexed inputs:

  IN_A2
  IN_A1
  IN_A0
  IN_D

Pins for AC-ADC conversion:

  ADC_OUT
  ADC_IN

Pins for RC decay time measurements:

  RC_DECAY2
  RC_DECAY1

Pins for PCB Connector J4:


Pins for PCB Connector J5:


Pins for PCB Connector J6:


Pins for 10x64 LED Display Test:



# Functions


________________
PUB  ini_74HC151

Initialize 74HC151 bus pins

________________________________
PUB  get_74HC151(invert_flag) : 

Retrieve input from buttons and switches attached to 74HC151.
Parameter invert_flag must be 1 (inverted 74HC151 output)
  or 0 (non-inverted 74HC151 output).

__________________
PUB  high(pin_bit)

Set pin high (1).
Direction register bit is configured to output.
pin_bit: Number of OUTA/DIRA register bit, i.e. 0..31

_________________
PUB  low(pin_bit)

Set pin low (0).
Direction register bit is configured to output.
pin_bit: Number of OUTA/DIRA register bit, i.e. 0..31


******************************************************************************
Terms of Use:

Zerocat Dev Kit is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

Zerocat Dev Kit is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License along
with Zerocat Dev Kit.  If not, see <http://www.gnu.org/licenses/>.

************************************************************** End of File ***