Singapore - General Counter Module

Back to VSCP Modules

General counter module with six protected counter inputs.

Current Harware Version: See Bejing
Current Firmware version:  No firmware release yet.

:!:Preliminary:!:

Download

Got to http://www.grodansparadis.com for up to date info :!:

Firmware

No firmware release yet.

Schematics

Schematics files are the same as for Bejing

About

:pictures:beijing_b.jpg

The Singapore Counter module can be used as a low cost general 5V counter module which monitor six channels. The moule gives hi frequency pulse counting and a built in decision matrix that can be programmed to control an input from any VSCP event makes this module useful in many control situations.

The firmware is built to handle 8 channels.

The module will retain the counter values even after the current has been removed from the device.

Registers

Configuration
Register 0(0x00) - Zone. Read/write.
Register 1(0x01) - Subzone 0. Read/write.
Register 2(0x02) - Subzone 1. Read/write.
Register 3(0x03) - Subzone 2. Read/write.
Register 4(0x04) - Subzone 3. Read/write.
Register 5(0x05) - Subzone 4. Read/write.
Register 6(0x06) - Subzone 5. Read/write.
Register 7(0x07) - Subzone 5. Read/write.
Register 8(0x08) - Subzone 5. Read/write.

The firmware can handle up to eight channels. Each channel can have its own subzone.

Available channels
Register 9(0x09) - # available channels. Read only.

Different hardware implementions can have different number of channels. The available number of channels can be read in this register.

Main configuration
Register 10(0x0A) - Module configuration bits.
  • Bit 0 - Set to 1 to enable stream events.
Time between count events
Register 11(0x0B) - Time between stream events (seconds), all channels. Read/Write

The stream events control bit and this value must be set to a value that is not zero to get stream events. The stream events holds all bits as described below.

Channel counter 32-bit values
Register 17(0x11) - Channel 0 value MSB. Read/Write.
Register 18(0x12) - Channel 0 value. Read/Write.
Register 19(0x13) - Channel 0 value. Read/Write.
Register 20(0x14) - Channel 0 value LSB . Read/Write.
Register 21(0x15) - Channel 1 value MSB. Read/Write.
Register 22(0x16) - Channel 1 value. Read/Write.
Register 23(0x17) - Channel 1 value. Read/Write.
Register 24(0x18) - Channel 1 value LSB . Read/Write.
Register 25(0x19) - Channel 2 value MSB. Read/Write.
Register 26(0x1A) - Channel 2 value. Read/Write.
Register 27(0x1B) - Channel 2 value. Read/Write.
Register 28(0x1C) - Channel 2 value LSB . Read/Write.
Register 29(0x1D) - Channel 3 value MSB. Read/Write.
Register 30(0x1E) - Channel 3 value. Read/Write.
Register 31(0x1F) - Channel 3 value. Read/Write.
Register 32(0x20) - Channel 3 value LSB . Read/Write.
Register 33(0x21) - Channel 4 value MSB. Read/Write.
Register 34(0x22) - Channel 4 value. Read/Write.
Register 35(0x23) - Channel 4 value. Read/Write.
Register 36(0x24) - Channel 4 value LSB . Read/Write.
Register 37(0x25) - Channel 5 value MSB. Read/Write.
Register 38(0x26) - Channel 5 value. Read/Write.
Register 39(0x27) - Channel 5 value. Read/Write.
Register 40(0x28) - Channel 5 value LSB . Read/Write.
Register 41(0x29) - Channel 6 value MSB. Read/Write.
Register 42(0x2A) - Channel 6 value. Read/Write.
Register 43(0x2B) - Channel 6 value. Read/Write.
Register 44(0x2C) - Channel 6 value LSB . Read/Write.
Register 45(0x2D) - Channel 7 value MSB. Read/Write.
Register 46(0x2E) - Channel 7 value. Read/Write.
Register 47(0x2F) - Channel 7 value. Read/Write.
Register 48(0x30) - Channel 7 value LSB . Read/Write.
Channel Control Registers
Register 49(0x31) - Channel 0 Control Register.  Read/Write
Register 50(0x32) - Channel 1 Control Register.  Read/Write
Register 51(0x33) - Channel 2 Control Register.  Read/Write
Register 52(0x34) - Channel 3 Control Register.  Read/Write
Register 53(0x35) - Channel 4 Control Register.  Read/Write
Register 54(0x36) - Channel 5 Control Register.  Read/Write
Register 55(0x37) - Channel 6 Control Register.  Read/Write
Register 56(0x38) - Channel 7 Control Register.  Read/Write

The channel control bits enable disable intelligent channel functionality

  • Bit 0 - Direction. 0=up. 1=down.
  • Bit 1 - Overflow/underflow handling. 0=normal, 1=stay at zero.
  • Bit 2 - Reserved.
  • Bit 3 - Reserved.
  • Bit 4 - Reserved.
  • Bit 5 - Send Alarm on overflow/underflow. (0=disabed, 1=enabled).
  • Bit 6 - Activate alarm when alarm value reached. (0=disabed, 1=enabled).
  • Bit 7 - Send count event on each pulse. (0=disabed, 1=enabled).

Stream events report the state of all channels as strem event(s) for all channels with a frequency set in the time between stream events registers.

Channel Alarm level - 32-bit values
Register 57(0x39) - Channel 0 value MSB. Read/Write.
Register 58(0x3A) - Channel 0 value. Read/Write.
Register 59(0x3B) - Channel 0 value. Read/Write.
Register 60(0x3C) - Channel 0 value LSB . Read/Write.
Register 61(0x3D) - Channel 1 value MSB. Read/Write.
Register 62(0x3E) - Channel 1 value. Read/Write.
Register 63(0x3F) - Channel 1 value. Read/Write.
Register 64(0x40) - Channel 1 value LSB . Read/Write.
Register 65(0x41) - Channel 2 value MSB. Read/Write.
Register 66(0x42) - Channel 2 value. Read/Write.
Register 67(0x43) - Channel 2 value. Read/Write.
Register 68(0x44) - Channel 2 value LSB . Read/Write.
Register 69(0x45) - Channel 3 value MSB. Read/Write.
Register 70(0x46) - Channel 3 value. Read/Write.
Register 71(0x47) - Channel 3 value. Read/Write.
Register 72(0x48) - Channel 3 value LSB . Read/Write.
Register 73(0x49) - Channel 4 value MSB. Read/Write.
Register 74(0x4A) - Channel 4 value. Read/Write.
Register 75(0x4B) - Channel 4 value. Read/Write.
Register 76(0x4C) - Channel 4 value LSB . Read/Write.
Register 77(0x4D) - Channel 5 value MSB. Read/Write.
Register 78(0x4E) - Channel 5 value. Read/Write.
Register 79(0x4F) - Channel 5 value. Read/Write.
Register 80(0x50) - Channel 5 value LSB . Read/Write.
Register 81(0x51) - Channel 6 value MSB. Read/Write.
Register 82(0x52) - Channel 6 value. Read/Write.
Register 83(0x53) - Channel 6 value. Read/Write.
Register 84(0x54) - Channel 6 value LSB . Read/Write.
Register 85(0x55) - Channel 7 value MSB. Read/Write.
Register 86(0x56) - Channel 7 value. Read/Write.
Register 87(0x57) - Channel 7 value. Read/Write.
Register 88(0x58) - Channel 7 value LSB . Read/Write.

Alarm is sent when count exceds set level.

Channel Alarm inactivity - 16-bit values

Seconds. 0 is no inactivity alarm.

Register 89(0x59) - Channel 0 value MSB. Read/Write.
Register 90(0x5A) - Channel 0 value. Read/Write.
Register 91(0x5B) - Channel 1 value MSB. Read/Write.
Register 92(0x5C) - Channel 1 value. Read/Write.
Register 93(0x4D) - Channel 2 value MSB. Read/Write.
Register 94(0x5E) - Channel 2 value. Read/Write.
Register 95(0x5F) - Channel 3 value MSB. Read/Write.
Register 96(0x60) - Channel 3 value. Read/Write.
Register 97(0x61) - Channel 4 value MSB. Read/Write.
Register 98(0x62) - Channel 4 value. Read/Write.
Register 99(0x63) - Channel 5 value MSB. Read/Write.
Register 100(0x64) - Channel 5 value. Read/Write.
Register 101(0x65) - Channel 6 value MSB. Read/Write.
Register 102(0x66) - Channel 6 value. Read/Write.
Register 103(0x67) - Channel 7 value MSB. Read/Write.
Register 104(0x68) - Channel 7 value. Read/Write.

Alarm is sent when inactivity is detected on a channel for set time.

Registers for Decision Matrix
Register xxx(0xyy) - xxx(0xyy) - Decision Matrix ( eight elements)

Decision Matrix

The module have a decision matrix with seven entries.

Available Actions

0(0x00) - NOOP, No action.
1(0x01) - Send state. Can be used for sync requests.
2(0x02) - Inactivate channel report for channel given by argument 0-15.
3(0x03) - Activate channel report for channel given by argument 0-15.
4(0x04) - Clear counter channel report for channel given by argument 0-15.

Alarm register

Inactivity.

Events

On

Can be sent on configurable intervals or on state transitions.

Class: 0x014 
Type: 0x03

Package:

Byte 0: Index.
Byte 1: Zone
Byte 2: Subzone

Index is 0 for channel 0, 1 for channel 1 and so on.

Off

Can be sent on configurable intervals or on state transitions.

Class: 0x014 
Type: 0x04

Package:

Byte 0: index.
Byte 1: Zone
Byte 2: Subzone

Index is 0 for channel 0, 1 for channel 1 and so on.

Stopped

Can be sent on configurable intervals or on state transitions.

Class: 0x014 
Type: 0x18

Package:

Byte 0: index.
Byte 1: Zone
Byte 2: Subzone

Index is 0 for channel 0, 1 for channel 1 and so on.

Started

Can be sent on configurable intervals or on state transitions.

Class: 0x014 
Type: 0x19

Package:

Byte 0: index.
Byte 1: Zone
Byte 2: Subzone

Index is 0 for channel 0, 1 for channel 1 and so on.

Alarm

If enabled the event is sent when a channel goes from active to inactive.

Class: 0x001 
Type: 0x02

Package:

Byte 0: index.
Byte 1: Zone
Byte 2: Subzone

Index is 0 for channel 0, 1 for channel 1 and so on.

Stream Data with zone

A stream event is sent on intervals to report I/O channel state.

Class: 0x014 
Type: 0x26

Package:

Byte 0: Zone.
Byte 1: Subzone.
Byte 2: Index.
Byte 3: Channel id.
Byte 4: Channel value MSB.
Byte 5: Channel value.
Byte 6: Channel value.
Byte 7: Channel value LSB.

Index is increased for every event that is sent out.

Contact Information

This is open hardware / software that is made by Ake Hedman, eurosource, Sweden. It is free to use for commecial or non commercial use.

Email: vscp@eurosource.se

Company:

eurosource
Brattbergavagen 17
820 50 LOS 
SWEDEN

info@eurosource.se
http://www.eurosource.se

Phone: +46 657 413430
Fax: +46 657 413503

Modules and components are sold at http://www.eurosource.se/catalog

More info about the VSCP and CANAL protocol can be found at http://www.vscp.org

 
modules/singapore.txt · Last modified: 2018/02/08 17:47 (external edit)
[unknown button type]
 
Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki