User Tools

Site Tools


xnorit:public:dependencies:xnorserial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
xnorit:public:dependencies:xnorserial [2021/04/06 09:04] – [Protocol:] timdv91xnorit:public:dependencies:xnorserial [2023/02/26 04:55] (current) – external edit 127.0.0.1
Line 17: Line 17:
 } }
  
-void serialEvent1(){XS.SerialEventProc();}  // Event handler for Serial1, edit number accordingly! XS.SerialEventProc(); can also be called inside a loop. +void serialEvent1(){XS.SerialEventProc();}  // Event handler for Serial1. 
 +                                            // Edit Serial-number accordingly! XS.SerialEventProc(); can also be called inside a loop when interrupt based serial events are not supported. 
  
 void loop(){...} void loop(){...}
Line 46: Line 47:
 To read data from the embedded device the host has to send an SOH-byte followed by 2 protocol bytes. Those 2 bytes configure the start index and amount of data we request from the embedded device'shared' byte array. To read data from the embedded device the host has to send an SOH-byte followed by 2 protocol bytes. Those 2 bytes configure the start index and amount of data we request from the embedded device'shared' byte array.
    
-{{ :xnorit:public:dependencies:xnorserial:xnorserialread1.jpg?400| Read requests }}+{{ :xnorit:public:dependencies:xnorserial:xnorserialread1.png?400| Read requests }}
  
   * ** First byte: ** \\ The SOH-byte, can be send in conjunction with other data-bytes or as separate byte.    * ** First byte: ** \\ The SOH-byte, can be send in conjunction with other data-bytes or as separate byte. 
Line 65: Line 66:
 === Write request: === === Write request: ===
  
-{{ :xnorit:public:dependencies:xnorserial:xnorserialwrite.jpg?400| Write request}}+{{ :xnorit:public:dependencies:xnorserial:xnorserialwrite1.png?400| Write request}}
  
 To write data to the embedded device, the host has to send an SOH-byte before sending 2 protocol bytes. \\ To write data to the embedded device, the host has to send an SOH-byte before sending 2 protocol bytes. \\
Line 78: Line 79:
   * Orange: Requesting 5 bytes from the embedded device's bus_memory starting at index 10.   * Orange: Requesting 5 bytes from the embedded device's bus_memory starting at index 10.
   * Purple: Writing 5 bytes to the embedded device's bus_memory starting at index 10. Writing bytes values 1,2,3,4,5   * Purple: Writing 5 bytes to the embedded device's bus_memory starting at index 10. Writing bytes values 1,2,3,4,5
-  * Note how before writing the data in-between the ACK and EOT bytes are all equal to zero, while after writing they represent the same 1,2,3,4,5 values that we wrote to them. +  * Note how before writing the data in-between the ACK and EOT bytes are all equal to zero, while after writing they represent the same 1,2,3,4,5 values that we wrote to them. Additionally you can also note how a write action does not return data, except for the ACK reply and EOT byte automatically send by the embedded device.  
  
 \\ \\
  
xnorit/public/dependencies/xnorserial.1617699851.txt.gz · Last modified: (external edit)