{"id":5085,"date":"2021-02-19T04:30:55","date_gmt":"2021-02-19T04:30:55","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=5085"},"modified":"2022-11-23T10:59:39","modified_gmt":"2022-11-23T05:29:39","slug":"exercise-modifying-i2c-transactions","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/","title":{"rendered":"STM32 I2C Lecture 61 &#8211; Exercise: Modifying I2C transactions"},"content":{"rendered":"<div class=\"boldgrid-section\" style=\"background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"container\">\n<div class=\"row\" style=\"padding-top: 50px; padding-bottom: 0px; background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"col-md-1 col-sm-12 col-xs-12 col-lg-1\">\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"col-md-10 col-sm-12 col-xs-12 col-lg-10\">\n<h1 class=\"\" style=\"text-align: center; font-size: 32px; border-width: 0px; line-height: 50px;\"><span style=\"color: #000080;\">Exercise: Modifying I2C transactions<\/span><\/h1>\n<div class=\"row bg-editor-hr-wrap\" style=\"border-width: 0px; margin-top: -25px;\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<div>\n<p>&nbsp;<\/p>\n<div class=\"bg-hr bg-hr-16 color2-color\" style=\"border-style: solid; border-width: 0px 0px 3px;\"><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"row bg-editor-hr-wrap\">\n<hr>\n<\/div>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">In this article, let\u2019s discuss the procedure to make the slave send more than 32 bytes of data to the Arduino master. For this, you have to modify the earlier application.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 20px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><b>Steps:<\/b><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">1. Create a new application and give the name 014i2c_slave_tx_string2.c, as shown in Figure 1.<\/span><\/p>\n<figure id=\"attachment_5087\" aria-describedby=\"caption-attachment-5087\" style=\"width: 745px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-5087 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-1-2.png\" alt=\"Modifying I2C transactions\" width=\"745\" height=\"402\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2.png 1915w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2-300x162.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2-768x414.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2-1024x552.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2-600x324.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2-120x65.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2-500x270.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2-200x108.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2-400x216.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2-800x432.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2-1200x647.png 1200w\" sizes=\"(max-width: 745px) 100vw, 745px\" \/><figcaption id=\"caption-attachment-5087\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Creating a new application.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">2. You can see that the Tx_buf shown in Figure 2 has a large number of data, approximately it is around 400 bytes. Now let\u2019s see how the master can fetch this data from the slave using I2C transactions.<\/span><\/p>\n<figure id=\"attachment_5089\" aria-describedby=\"caption-attachment-5089\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-5089\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-2-2.png\" alt=\"Modifying I2C transactions\" width=\"744\" height=\"397\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-2-2.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-2-2-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-2-2-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-2-2-1024x546.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-2-2-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-2-2-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-2-2-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-2-2-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-2-2-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-2-2-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-2-2-1200x640.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5089\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Contents of Tx_buf.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">3. For this application, you have to make certain modifications to the earlier application. Now let\u2019s discuss them one by one.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">4. First, the master executes the I2C transactions to read the 4 bytes of length information. Now the length information will be 4 bytes instead of 1 byte, which you used in the previous exercise.<\/span><\/p>\n<p class=\"\" style=\"padding-left: 30px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">a. Master sends the command 0X51 (Figure 3) to the slave to read the length information.&nbsp;<\/span><\/p>\n<figure id=\"attachment_5088\" aria-describedby=\"caption-attachment-5088\" style=\"width: 745px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-5088\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-3-2.png\" alt=\"Modifying I2C transactions\" width=\"745\" height=\"245\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-3-2.png 1793w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-3-2-300x99.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-3-2-768x252.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-3-2-1024x336.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-3-2-600x197.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-3-2-120x39.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-3-2-500x164.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-3-2-200x66.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-3-2-400x131.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-3-2-800x263.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-3-2-1200x394.png 1200w\" sizes=\"(max-width: 745px) 100vw, 745px\" \/><figcaption id=\"caption-attachment-5088\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Sequence diagram for data write (Master sending command to slave).<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"padding-left: 30px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">b. After sending the command, the master executes data read I2C transaction and slave replies 4 bytes of length information. For example, if the length is 0X480, then the slave returns the length information to the Arduino code, as shown in Figure 4.<\/span><\/p>\n<figure id=\"attachment_5090\" aria-describedby=\"caption-attachment-5090\" style=\"width: 745px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5090\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-4-2.png\" alt=\"Modifying I2C transactions\" width=\"745\" height=\"270\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-4-2.png 1835w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-4-2-300x109.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-4-2-768x278.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-4-2-1024x371.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-4-2-600x217.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-4-2-120x43.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-4-2-500x181.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-4-2-200x72.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-4-2-400x145.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-4-2-800x289.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-4-2-1200x434.png 1200w\" sizes=\"(max-width: 745px) 100vw, 745px\" \/><figcaption id=\"caption-attachment-5090\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. Sequence diagram for data read (Master reading response from the slave).<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">5. After that, the I2C transactions to read length bytes of data from the slave are performed.<\/span><\/p>\n<ol class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400; color: #000000;\">First, the master sends the 0X52 command to read the data (nothing but data write transaction shown in Figure 3).<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400; color: #000000;\">If the length is lesser than or equal to 32 bytes, then only one read transaction will be performed by the master (Figure 5). Otherwise, more read transactions will be performed by the master (Figure 6).<\/span><\/li>\n<\/ol>\n<figure id=\"attachment_5092\" aria-describedby=\"caption-attachment-5092\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5092\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-5-2.png\" alt=\"Modifying I2C transactions\" width=\"744\" height=\"244\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-5-2.png 1804w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-5-2-300x98.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-5-2-768x252.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-5-2-1024x335.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-5-2-600x197.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-5-2-120x39.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-5-2-500x164.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-5-2-200x66.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-5-2-400x131.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-5-2-800x262.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-5-2-1200x393.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5092\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 5. Data read transaction performed by the master when the length &lt; =32.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_5093\" aria-describedby=\"caption-attachment-5093\" style=\"width: 745px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5093\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-6-2.png\" alt=\"Modifying I2C transactions\" width=\"745\" height=\"470\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2.png 1455w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-300x189.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-768x484.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-1024x645.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-600x378.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-120x76.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-500x315.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-320x202.png 320w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-700x441.png 700w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-200x126.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-400x252.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-800x504.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-6-2-1200x756.png 1200w\" sizes=\"(max-width: 745px) 100vw, 745px\" \/><figcaption id=\"caption-attachment-5093\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 6. Data read transactions performed by the master when the length &gt;32.<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"padding-left: 30px; padding-top: 0em; margin-top: 21px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">For example, let\u2019s say the length is 65. Since, in one read transaction, it is possible for the master to read only 32 bytes, you need 3 I2C read transactions to read the data of length 65 bytes.<\/span><\/p>\n<p class=\"\" style=\"padding-left: 30px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">All the steps discussed above are already implemented in the 014-application shown in Figure 1.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">6. On the Arduino side, you have to use the application 003ICMasterRxStringLen shown in Figure 7.<\/span><\/p>\n<figure id=\"attachment_5096\" aria-describedby=\"caption-attachment-5096\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5096\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-7-2.png\" alt=\"Modifying I2C transactions\" width=\"744\" height=\"399\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-7-2.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-7-2-300x161.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-7-2-768x411.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-7-2-1024x548.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-7-2-600x321.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-7-2-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-7-2-500x268.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-7-2-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-7-2-400x214.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-7-2-800x428.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-7-2-1200x642.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5096\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 7. Arduino code (003ICMasterRxStringLen).<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">7. Now let\u2019s test this application. First, download the code into the master, which is our Arduino board, by clicking on the upload button (Figure 8).<\/span><\/p>\n<figure id=\"attachment_5097\" aria-describedby=\"caption-attachment-5097\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5097\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-8-2.png\" alt=\"Modifying I2C transactions\" width=\"744\" height=\"398\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-8-2.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-8-2-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-8-2-768x410.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-8-2-1024x547.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-8-2-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-8-2-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-8-2-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-8-2-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-8-2-400x214.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-8-2-800x427.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-8-2-1200x641.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5097\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 8. Downloading the code into Arduino board.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">8. Go back to the application (STM code).<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">9. Compile the code (Figure 9).<\/span><\/p>\n<figure id=\"attachment_5098\" aria-describedby=\"caption-attachment-5098\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5098\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-9-2.png\" alt=\"Modifying I2C transactions\" width=\"744\" height=\"397\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-9-2.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-9-2-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-9-2-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-9-2-1024x546.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-9-2-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-9-2-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-9-2-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-9-2-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-9-2-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-9-2-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-9-2-1200x640.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5098\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 9. Compiling the code.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">10.&nbsp;&nbsp;<span style=\"font-weight: 400;\">Open the serial monitor (Figure 10).<\/span><\/span><\/p>\n<figure id=\"attachment_5100\" aria-describedby=\"caption-attachment-5100\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5100\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-10-2.png\" alt=\"Modifying I2C transactions\" width=\"744\" height=\"398\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-10-2.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-10-2-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-10-2-768x411.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-10-2-1024x548.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-10-2-600x321.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-10-2-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-10-2-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-10-2-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-10-2-400x214.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-10-2-800x428.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-10-2-1200x642.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5100\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 10. Opening serial monitor.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">11.&nbsp;<span style=\"font-weight: 400;\">Send character \u2018s\u2019 to begin the transaction (Figure 11).<\/span><\/span><\/p>\n<figure id=\"attachment_5101\" aria-describedby=\"caption-attachment-5101\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5101\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-11-2.png\" alt=\"Modifying I2C transactions\" width=\"744\" height=\"399\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-11-2.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-11-2-300x161.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-11-2-768x412.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-11-2-1024x549.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-11-2-600x322.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-11-2-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-11-2-500x268.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-11-2-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-11-2-400x214.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-11-2-800x429.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-11-2-1200x643.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5101\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 11. Sending character \u2018s\u2019.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">12. Look at Figure 12. The master has fetched 406 bytes of data from the slave.<\/span><\/p>\n<figure id=\"attachment_5102\" aria-describedby=\"caption-attachment-5102\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5102\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/02\/Figure-12-2.png\" alt=\"Modifying I2C transactions\" width=\"744\" height=\"399\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-12-2.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-12-2-300x161.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-12-2-768x411.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-12-2-1024x548.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-12-2-600x321.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-12-2-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-12-2-500x268.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-12-2-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-12-2-400x214.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-12-2-800x428.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-12-2-1200x642.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5102\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 12. Data fetched from the slave.<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Go through the code which is there in the application 014. This is the modified version of application 013. Both the applications are almost the same. But some modifications are done since the length of the data is changed.<\/span><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Exercise: Modifying I2C transactions &nbsp; &nbsp; In this article, let\u2019s discuss the procedure to make the slave send more than 32 bytes of data to the Arduino master. For this, you have to modify the earlier application. Steps: 1. Create a new application and give the name 014i2c_slave_tx_string2.c, as shown in Figure 1. &nbsp; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5087,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[8],"tags":[23],"class_list":["post-5085","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-stm32-i2c-lectures","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>STM32 I2C Lecture 61 - Exercise: Modifying I2C transactions<\/title>\n<meta name=\"description\" content=\"Exercise: Modifying I2C transactions. In this article, let\u2019s discuss the procedure to make the slave send more than 32 bytes of data to the Arduino master.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"STM32 I2C Lecture 61 - Exercise: Modifying I2C transactions\" \/>\n<meta property=\"og:description\" content=\"Exercise: Modifying I2C transactions. In this article, let\u2019s discuss the procedure to make the slave send more than 32 bytes of data to the Arduino master.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/\" \/>\n<meta property=\"og:site_name\" content=\"FastBit EBA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fastbiteba\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-19T04:30:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-23T05:29:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1915\" \/>\n\t<meta property=\"og:image:height\" content=\"1033\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"FastBitLab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:site\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FastBitLab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"STM32 I2C Lecture 61 &#8211; Exercise: Modifying I2C transactions\",\"datePublished\":\"2021-02-19T04:30:55+00:00\",\"dateModified\":\"2022-11-23T05:29:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/\"},\"wordCount\":635,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/Figure-1-2.png\",\"keywords\":[\"STM32 I2C Lectures\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/\",\"name\":\"STM32 I2C Lecture 61 - Exercise: Modifying I2C transactions\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/Figure-1-2.png\",\"datePublished\":\"2021-02-19T04:30:55+00:00\",\"dateModified\":\"2022-11-23T05:29:39+00:00\",\"description\":\"Exercise: Modifying I2C transactions. In this article, let\u2019s discuss the procedure to make the slave send more than 32 bytes of data to the Arduino master.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/Figure-1-2.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/Figure-1-2.png\",\"width\":1915,\"height\":1033,\"caption\":\"Figure 1. Creating a new application.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-modifying-i2c-transactions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STM32 I2C Lecture 61 &#8211; Exercise: Modifying I2C transactions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"name\":\"FastBit EBA\",\"description\":\"Your Online Academy of Embedded Systems\",\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\",\"name\":\"FastBit EBA\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"width\":640,\"height\":640,\"caption\":\"FastBit EBA\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/fastbiteba\\\/\",\"https:\\\/\\\/x.com\\\/fastbiteba\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/fastbit-embedded-brain-academy-b3167b124\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCa1REBV9hyrzGp2mjJCagBg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\",\"name\":\"FastBitLab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"caption\":\"FastBitLab\"},\"description\":\"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"STM32 I2C Lecture 61 - Exercise: Modifying I2C transactions","description":"Exercise: Modifying I2C transactions. In this article, let\u2019s discuss the procedure to make the slave send more than 32 bytes of data to the Arduino master.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/","og_locale":"en_US","og_type":"article","og_title":"STM32 I2C Lecture 61 - Exercise: Modifying I2C transactions","og_description":"Exercise: Modifying I2C transactions. In this article, let\u2019s discuss the procedure to make the slave send more than 32 bytes of data to the Arduino master.","og_url":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2021-02-19T04:30:55+00:00","article_modified_time":"2022-11-23T05:29:39+00:00","og_image":[{"width":1915,"height":1033,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2.png","type":"image\/png"}],"author":"FastBitLab","twitter_card":"summary_large_image","twitter_creator":"@fastbiteba","twitter_site":"@fastbiteba","twitter_misc":{"Written by":"FastBitLab","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"STM32 I2C Lecture 61 &#8211; Exercise: Modifying I2C transactions","datePublished":"2021-02-19T04:30:55+00:00","dateModified":"2022-11-23T05:29:39+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/"},"wordCount":635,"commentCount":0,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2.png","keywords":["STM32 I2C Lectures"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/","url":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/","name":"STM32 I2C Lecture 61 - Exercise: Modifying I2C transactions","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2.png","datePublished":"2021-02-19T04:30:55+00:00","dateModified":"2022-11-23T05:29:39+00:00","description":"Exercise: Modifying I2C transactions. In this article, let\u2019s discuss the procedure to make the slave send more than 32 bytes of data to the Arduino master.","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/02\/Figure-1-2.png","width":1915,"height":1033,"caption":"Figure 1. Creating a new application."},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/exercise-modifying-i2c-transactions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"STM32 I2C Lecture 61 &#8211; Exercise: Modifying I2C transactions"}]},{"@type":"WebSite","@id":"https:\/\/fastbitlab.com\/blog\/#website","url":"https:\/\/fastbitlab.com\/blog\/","name":"FastBit EBA","description":"Your Online Academy of Embedded Systems","publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fastbitlab.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fastbitlab.com\/blog\/#organization","name":"FastBit EBA","url":"https:\/\/fastbitlab.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","width":640,"height":640,"caption":"FastBit EBA"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/fastbiteba\/","https:\/\/x.com\/fastbiteba","https:\/\/www.linkedin.com\/in\/fastbit-embedded-brain-academy-b3167b124\/","https:\/\/www.youtube.com\/channel\/UCa1REBV9hyrzGp2mjJCagBg"]},{"@type":"Person","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d","name":"FastBitLab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","caption":"FastBitLab"},"description":"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries."}]}},"_links":{"self":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/5085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/comments?post=5085"}],"version-history":[{"count":5,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/5085\/revisions"}],"predecessor-version":[{"id":12603,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/5085\/revisions\/12603"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/5087"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=5085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=5085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=5085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}