Difference between revisions of "Component: Injector (DS1307 RTC) (Simulation)"
(XML import) |
(XML import) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | |||
+ | |||
{| width="50%" | {| width="50%" | ||
|- | |- | ||
Line 5: | Line 7: | ||
|- | |- | ||
| width="20%" style="color: gray;" | Version | | width="20%" style="color: gray;" | Version | ||
− | | 1.0 | + | | 1.0 (Release) |
|- | |- | ||
| width="20%" style="color: gray;" | Category | | width="20%" style="color: gray;" | Category | ||
Line 19: | Line 21: | ||
==Examples== | ==Examples== | ||
− | + | This example uses the I2C master component combined with the DS1307 injector to simulate an I2C communications bus between the target Microcontroller and the virtual DS1307 device. | |
+ | {{Fcfile|DS1307InjectorTest.fcfx|I2C DS1307 Example}} | ||
+ | The panel displays the current time from the DS1307 RAM which is populated to match the system time. | ||
+ | |||
+ | [[File:DS1307Panel.jpg]] | ||
+ | |||
+ | |||
+ | The I2C console shows the communications between the target microcontroller and simulated I2C device. | ||
+ | |||
+ | [[File:DS1307Data.jpg]] | ||
+ | |||
+ | The DS1307 console shows the contents of RAM memory on the simulated I2C device. | ||
+ | |||
+ | [[File:DS1307Ram.jpg]] | ||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
Line 29: | Line 44: | ||
''This component inherits simulation macros from ''[[Component: ID cc936c18_5d20_42c4_b940_d3c7ea7ca802|Data Injector]] | ''This component inherits simulation macros from ''[[Component: ID cc936c18_5d20_42c4_b940_d3c7ea7ca802|Data Injector]] | ||
+ | |||
+ | ===<span style="font-weight: normal;"><u><tt>InitialiseInjector</tt></u></span>=== | ||
+ | Sets up the injector ready to receive commands or send data | ||
+ | |||
+ | '''Parameters''' | ||
+ | |||
+ | :[[Variable Types|<- STRING]] ''InjectorName'' | ||
+ | ::Name of the console that will be created | ||
+ | ::''This parameter may be returned back to the caller'' | ||
+ | |||
+ | |||
+ | '''Return value''' | ||
+ | |||
+ | :[[Variable Types|BYTE]] | ||
+ | |||
===<span style="font-weight: normal;"><u><tt>TxByte</tt></u></span>=== | ===<span style="font-weight: normal;"><u><tt>TxByte</tt></u></span>=== | ||
Line 97: | Line 127: | ||
:[[Variable Types|HANDLE]] | :[[Variable Types|HANDLE]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Latest revision as of 11:25, 13 February 2015
Author | Matrix Ltd |
Version | 1.0 (Release) |
Category | Simulation |
This inherits from Data Injector |
Contents
Injector (DS1307 RTC) component
Comms data injector to allow simulation of a DS1307 Real Time Clock and RAM.
Examples
This example uses the I2C master component combined with the DS1307 injector to simulate an I2C communications bus between the target Microcontroller and the virtual DS1307 device.
I2C DS1307 Example
The panel displays the current time from the DS1307 RAM which is populated to match the system time.
The I2C console shows the communications between the target microcontroller and simulated I2C device.
The DS1307 console shows the contents of RAM memory on the simulated I2C device.
Downloadable macro reference
This component does not contain any downloadable macros
Simulation macro reference
This component inherits simulation macros from Data Injector
InitialiseInjector
Sets up the injector ready to receive commands or send data
Parameters
- <- STRING InjectorName
- Name of the console that will be created
- This parameter may be returned back to the caller
Return value
TxByte
Puts a byte onto the comms channel.
Parameters
- BYTE DataByte
Return value
- This call does not return a value
RxByte
Gets a byte from the comms channel - 255 signifies no more data available
Parameters
- This macro has no parameters
Return value
GetTxConsoleHandle
Gets the handle to the console allowing data displaying on the panel etc.
This call is provided by Data Injector
Parameters
- This macro has no parameters
Return value
ChangeState
Changes the state for I2C or SPI type comms where the data bytes along are not enough to go on.
Parameters
- BYTE NewState
Return value
- This call does not return a value
GetRxConsoleHandle
Gets the handle to the console allowing data displaying on the panel etc.
This call is provided by Data Injector
Parameters
- This macro has no parameters
Return value
GetConsoleHandle
Gets the handle to the console allowing data displaying on the panel etc.
Parameters
- This macro has no parameters
Return value
Property reference
Circular Buffer Size
This property is of type Unsigned integer and can be referenced with the variable name CircularBufferSize.
No additional information
Termination Character
This property is of type Fixed list of ints and can be referenced with the variable name TermChar.
No additional information
Device Address
This property is of type Unsigned integer and can be referenced with the variable name DeviceAddress.
No additional information