ssl

The site is no longer categorized as "unsave website". Data is from today (may 18) encripted via SSL. The official web adres is now https://www.jbsiemonsma.nl.

0
0
0
s2smodern

In the new standard, serial3 is used for communication between boards. It must be activated by setting the global boolean UseIntercard to true (Userconfiguration.h). At the end of every FSM cycle serial3 is checked on available data. If there is data, just one message will be processed each time (leaving available data for the next cycle). By processing the message, one of the global variables for intercard communication is set for just one cycle in the FSM loop. After one cycle all global strings are blanked. It is possible to send 4 different messages to another board; @CHAR01 followed by one character; @CHAR10, followed by max 10 characters; @INT001, followed by just one number and @INT003, followed by 3 numbers. When receiving an Intercard message, the following global strings are set for just one FSM cycle; IntercardChar01, IntercardChar10, IntercardInt001 and IntercardInt003 (depending on the "expected" Intercard message). While using this communication, be aware to check on the globals while running the cycles (it is easy to miss the message).

At the moment the software is in a test phase. A possible application of the Intercard protocol is project "Notification call systems". See under "Projects" for the full description or click here.

 

figure. simple Intercard communication. 

Untitled Sketch 2 bb

 

    

 

 

0
0
0
s2smodern

AFSM 2.6 Available.

The new software for the AFSM is now availble! The main changes are in the new Configurator. The software is also available under the Software part of the website. Find the description of the Configurator under Menu/Declaration part or click here.

 

CV005

 

0
0
0
s2smodern

Download statitistics

Below the current statistics of the downloads. By far the ZIP file for the libraries is most downloaded.
Just for information.

DownStat 

 

0
0
0
s2smodern
 
Arduino MEGA2560 vs Arduino DUE
 
DUE
 
The DUE is the second Arduino type that i've updated for loading the AFSM. As documented some of the differences between the 2560 and the DUE, is the fact that the DUE is a 3.3Vdc board insted of 5Vdc and the DUE is much faster and has much more memory.
 
Summary Microcontroller ATmega2560
 
  • Operating Voltage 5V
  • Digital I/O Pins 54 (of which 14 provide PWM output)
  • Analog Input Pins 16
  • Current for 3.3V Pin 50 mA
  • Flash Memory 256 KB of which 8 KB used by bootloader
  • SRAM 8 KB
  • EEPROM 4 KB
  • Clock Speed 16 MHz

Summary Microcontroller Atmel SAM3X8E ARM Cortex-M3 CPU (risc processor)

  • 54 digital input/output pins (of which 12 can be used as PWM outputs)
  • 12 analog input
  • 84 MHz clock
  • USB OTG capable connection
  • 2 DAC (digital to analog)
  • 2 TWI
  • 3.3V and compliant with the 1.0 Arduino pinout.
  • 96 KBytes of SRAM.
  • 512 KBytes of Flash memory for code.
  • A DMA controller that can relieve the CPU from doing memory intensive tasks.
 
When making a serious control -i think- the differences of 3,3Vdc and 5Vdc will surface clearly.
But what are the software changes for making this board work with the AFSM?
At the first build of the board i got:
  • Failure resetting the board from HMI
  • Failure on FreeMemory function
  • The calculation for the size of the FSM state constructor is wrong

 

Adjustment made for the DUE (blue is new, green is old)

Added new libraries:

#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>

 

void ResetBoard()
{
  delay(2000);
  RSTC->RSTC_CR = RSTC_CR_KEY(0xA5) | RSTC_CR_PERRST | RSTC_CR_PROCRST;
  NVIC_SystemReset();
} // End of ResetBoard

 

void RAM()
{
  char top;
  int FreeMem;
  HMISendString("@VAL," + ValidationId);
  FreeMem = &top - reinterpret_cast<char*>(sbrk(0));
  HMISendString("@RAM," + String(FreeMem));
} // End of RAM

 

void InitFSMStates ()
{
  int StateNo = 0;
  FSMStateType* FSMStateLaatste;
  Serial.println ( F("Setup FSM States"));
  NoFSMStates = sizeof(PossibleFSMStates) / 12;
  //Serial.println(sizeof(PossibleFSMStates));
 
while (StateNo < NoFSMStates)
  .......

There is a great difference between the speed of similair controls. First test gave a serious reduction of the cycle time; for the DUE 0,18 mS and the similair MEGA2560 control has a cycle time of 0,87 mS. Notice also the difference in free memory.

 

AFSM 2560   AFSM ARM

 

 

 

 

 

 
 
 
 
 
  

0
0
0
s2smodern