Component: Injector (DS1307 RTC) ()

From Flowcode Help
Jump to navigationJump to search
Author Matrix Ltd
Version 1.1
Category


Injector (DS1307 RTC) component

Comms data injector to allow simulation of a DS1307 Real Time Clock and RAM.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_InjectorDS1307.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_InjectorDS1307.fcfx

Detailed description

No detailed description exists yet for this component

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. FC6 Icon.png I2C DS1307 Example The panel displays the current time from the DS1307 RAM which is populated to match the system time.

DS1307Panel.jpg


The I2C console shows the communications between the target microcontroller and simulated I2C device.

DS1307Data.jpg


The DS1307 console shows the contents of RAM memory on the simulated I2C device.

DS1307Ram.jpg






Macro reference

ChangeState

Fc9-comp-macro.png ChangeState
Changes the state for I2C or SPI type comms where the data bytes along are not enough to go on. 
Fc9-u8-icon.png - BYTE NewState
 
Fc9-void-icon.png - VOID Return


GetConsoleHandle

Fc9-comp-macro.png GetConsoleHandle
Gets the handle to the console allowing data displaying on the panel etc. 
Fc9-h32-icon.png - HANDLE Return


InitialiseInjector

Fc9-comp-macro.png InitialiseInjector
Sets up the injector ready to receive commands or send data 
Fc9-string-icon.png - STRING InjectorName
Name of the console that will be created 
Fc9-u8-icon.png - BYTE Return


RxByte

Fc9-comp-macro.png RxByte
Attempt to receive a byte back from the injector 0 - 255 = Valid data 256 = RX timeout no data available 
Fc9-u16-icon.png - UINT Return


RxByteCount

Fc9-comp-macro.png RxByteCount
Returns the number of bytes currently sat in the receive buffer. 
Fc9-u16-icon.png - UINT Return


TxByte

Fc9-comp-macro.png TxByte
Puts a byte onto the comms channel. 
Fc9-u8-icon.png - BYTE DataByte
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png DS1307 Injector Settings
Fc9-type-21-icon.png Circular Buffer Size
 
Fc9-type-16-icon.png Termination Character
 
Fc9-type-21-icon.png Device Address
 
Fc9-type-16-icon.png Day Setting
Configures how the day of the week is calculated.