<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56887/nrf52840-reporting-to-arduino-lcd-shield</link><description>Hi there! 
 Working with the nRF52840 DK, I am wondering how I might modify an existing SDK example in order to display the Tx and Rx Power characteristic on a hardware connected LCD display? 
 That is, rather than using a BLE-UART example, I&amp;#39;d like to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Feb 2020 09:06:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56887/nrf52840-reporting-to-arduino-lcd-shield" /><item><title>RE: nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/thread/232258?ContentTypeID=1</link><pubDate>Mon, 03 Feb 2020 09:06:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd9c09be-2459-4eab-9c12-3b4af28116f7</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What you can do, on the nRF side, you can try to analyze the SPI pins using a logic analyzer to see whether the data is actually coming out from the nRF. Another thing you can check is what SPI mode you screen use. If you look in the hardware_init() function, which sets up the spi:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;

    spi_config.sck_pin  = ILI9341_SCK_PIN;
    spi_config.miso_pin = ILI9341_MISO_PIN;
    spi_config.mosi_pin = ILI9341_MOSI_PIN;
    spi_config.ss_pin   = ILI9341_SS_PIN;

    err_code = nrf_drv_spi_init(&amp;amp;spi, &amp;amp;spi_config, NULL, NULL);
    return err_code;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The NRF_DRVI_SPI_DEFAULT_CONFIG uses&amp;nbsp;NRF_DRV_SPI_MODE_0. Try to set:&lt;/p&gt;
&lt;p&gt;spi_config.mode =&amp;nbsp;NRF_DRV_SPI_MODE_1 to&amp;nbsp;NRF_DRV_SPI_MODE_3, and see if that makes any difference.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And for each mode, try to connect DC to both GND and VDD.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/thread/232255?ContentTypeID=1</link><pubDate>Mon, 03 Feb 2020 08:41:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66cbeb23-12fe-4f4c-a8b5-492255532f80</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I don&amp;#39;t think DS pins are standard SPI pins. I found &lt;a href="https://forums.adafruit.com/viewtopic.php?f=47&amp;amp;t=51949" rel="noopener noreferrer" target="_blank"&gt;this&lt;/a&gt;, however. Just try to set it low and high, to see whether one works and one doesn&amp;#39;t.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/thread/232205?ContentTypeID=1</link><pubDate>Sun, 02 Feb 2020 21:27:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e42a533-72c5-4ceb-96e9-fd4dfa18256f</guid><dc:creator>SRall</dc:creator><description>&lt;p&gt;Edvin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for staying with me here so far, your help is much appreciated. I&amp;#39;ve double checked our connections with the pin-out you&amp;#39;ve provided above. Indeed they were the same as we&amp;#39;ve had them configured so far. Any thoughts on the &amp;#39;DC&amp;#39; pin labeled on the LCD PCB? Looking at &lt;a title="ILI9341 Display datasheet" href="http://www.lcdwiki.com/res/MSP2807/2.8inch_SPI_Module_MSP2807_User_Manual_EN.pdf" rel="noopener noreferrer" target="_blank"&gt;the data sheet&lt;/a&gt; of the LCD Display, it seems that pin would be best pulled to Ground or N.C. for this \gfx example. So far, we&amp;#39;ve had it N.C.&lt;/p&gt;
&lt;p&gt;So, starting with that, our next steps will have to be checking the display for issues, and finally with a different 840 DK. Any chance you have some insight as to what&amp;#39;s going on?&lt;/p&gt;
&lt;p&gt;Thanks again,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/thread/231040?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 08:54:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be1d9912-93b5-42b6-b46e-9d684e49d3ca</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Let us assume that you didn&amp;#39;t change much in the gfx example.&lt;/p&gt;
&lt;p&gt;By default, it uses the configuration of the ili9341, which is the one you are using.&lt;/p&gt;
&lt;p&gt;By default in this project, the following pins are set on the nRF52840:&lt;/p&gt;
&lt;p&gt;SCK(clock): P1.15&lt;/p&gt;
&lt;p&gt;MISO(SDO): P1.14&lt;/p&gt;
&lt;p&gt;MOSI(SDI): P1.13&lt;/p&gt;
&lt;p&gt;SS/CS: P1.12&lt;/p&gt;
&lt;p&gt;These should be connected to the corresponding pins on the screen, respectively: SCK, SDO, SDI, CS. In addition, you need to supply it with GND and VDD (0V and 3V), and for good measure, I would also connect LED (power for background light) to VDD, and RESET to pin P0.18. Please also check that SB42 on the DK is not cut (it should be shorted by default, so if you haven&amp;#39;t cut it, it is fine).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What does the log from the gfx application say when you run it?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/thread/231009?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 04:30:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:635381fe-b4ed-4dde-b36a-5924be5d54ce</guid><dc:creator>SRall</dc:creator><description>&lt;p&gt;Update on the Received Signal Strength Reporting:&lt;/p&gt;
[quote userid="86978" url="~/f/nordic-q-a/56887/nrf52840-reporting-to-arduino-lcd-shield/230949"]The only two parameters I&amp;#39;m really after are the Tx Signal strength to reference with as well as the Rx sensitivity of each connection (displayed on the central board). Can you point me to some of these parameters? Or resources?[/quote]
&lt;p&gt;Was able to log the rssi of the current connection to the console by use of the sd_ble_gap_rssi_start() and sd_ble_gap_rrsi_get() wrapped in a BLE_GAP_EVT_RSSI_CHANGED event to the handler. So, similar to what you mentioned in your initial reply. Really appreciate the guidance here mate.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/thread/231008?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 04:21:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:938c8437-c9ac-4f14-b4f9-66170ead54b1</guid><dc:creator>SRall</dc:creator><description>&lt;p&gt;Edvin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I hope you don&amp;#39;t mind me coming back to this. We took you up on your advice about eventually remapping the SPI pins to our custom pins, and simply using an ILI9341 controlled LCD Display. We settled on the &lt;a title="SPI_Module_ILI9341_SKU:MSP2807" href="http://www.lcdwiki.com/2.8inch_SPI_Module_ILI9341_SKU:MSP2807" rel="noopener noreferrer" target="_blank"&gt;2.8in TFT SPI Module&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;*No SPI pins were remapped at this point*&lt;/p&gt;
&lt;p&gt;To be efficient, we are just quickly setting it up to work with the gfx SDK example out of the box. The pins were a little tricky to figure out, as they don&amp;#39;t quite match SPI X-wire formats. But, we believe we were able to wire it to our nRF52840 PDK with 2x checked accuracy.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Problem is: Running the gfx example leaves a blank display (LED back light is lit).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Given the hardware mentioned, do you foresee an issue that might cause this symptom?&lt;/p&gt;
&lt;p&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/thread/230949?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2020 20:58:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb9c5f7f-fee6-4403-b86b-454e94474701</guid><dc:creator>SRall</dc:creator><description>&lt;p&gt;Thanks so much for the info. As far as the display, you make a good point. I may go back to reconsidering just how I go about the actual display, bearing this in mind. So thank you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As far as the reporting, I am, in fact, hoping to fetch data that have to do with an actual Bluetooth connection. Actually, the entire scheme will involve one board running ble multi-link central firmware while connected to three (3) other boards running ble_peripheral firmware. The only two parameters I&amp;#39;m really after are the Tx Signal strength to reference with as well as the Rx sensitivity of each connection (displayed on the central board). Can you point me to some of these parameters? Or resources?&lt;/p&gt;
&lt;p&gt;Thanks again for your time,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/thread/230806?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2020 09:59:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9b33ef4-b0d3-4af7-9b6b-78fd425d9307</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;1)&lt;/p&gt;
&lt;p&gt;Depends on what you want to do. Are you going to actually connect, or just fetch RSSI (signal strength) from advertising devices? Either way, you should look into one of the examples from the SDK\examples\ble_central folder. The examples here will typically look for a specific advertising device, and try to connect to that device. You can try to remove the filters that are applied by removing nrf_ble_scan_filter_set() and nrf_ble_scan_filters_enable(). Then try to add the&amp;nbsp;BLE_GAP_EVT_ADV_REPORT event to your ble_evt_handler() in main.c.&lt;/p&gt;
&lt;p&gt;Then you will get this event every time you pick up an advertisment packet. Inside this event, these parameters will probably be interesting for you:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.data.p_data
p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.data.len
p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.rssi
p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[]   // addr[0] -&amp;gt; addr[5]
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2)&lt;/p&gt;
&lt;p&gt;as for the display, you can try to change it from using&amp;nbsp;SPI to I2C/TWI. I just thought that this example would be a good starting point to get the screen up and running.&lt;/p&gt;
&lt;p&gt;You can look into changing the init and send functions to set up TWI instead of SPI.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="Sam_Rall"]this application is to be migrated to a 3rd party board in which the SPI pins are not available[/quote]
&lt;p&gt;Not quite sure I follow you here. The SPI pins aren&amp;#39;t available? You can use any pins as SPI pins on the nRF.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/thread/230698?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 15:39:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3857b73-9898-4169-8cd6-8b0a2c2e28c0</guid><dc:creator>SRall</dc:creator><description>&lt;p&gt;For 2)&lt;/p&gt;
&lt;p&gt;After some research on a compatible LCD, it seems the two controllers supported in the gfx example require the SPI pins. This is going to be a problem for me because eventually this application is to be migrated to a 3rd party board in which the SPI pins are not available.&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So, moving on to a different LCD controller, I found a lot of documentation &amp;amp; support for the H&lt;span&gt;itachi HD44780. If I include all the appropriate drivers/libraries and dependencies, should be able to display some characters from the DK right? Has anyone used the Hitachi HD44780 controller on the PCA10056 before?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks again for your time.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/thread/230672?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 14:42:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e0e85d7-fc01-4994-a4b8-ed22ebf37a9e</guid><dc:creator>SRall</dc:creator><description>&lt;p&gt;Great point, that is a good strategy. Appreciate the pointer to the gfx example, anywhere you can point me to help with #1?&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/56887/nrf52840-reporting-to-arduino-lcd-shield/230549"]1: You need to be able to fetch all the data that you at a some point want to display on the screen, but start with checking that you are able to view it in the log.[/quote]
&lt;p&gt;Thanks again for your time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Reporting to Arduino LCD shield?</title><link>https://devzone.nordicsemi.com/thread/230549?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 10:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef131c90-12b6-4042-95d5-934940c37688</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;This question is really divided in two, and I suggest that you do that with the development as well.&lt;/p&gt;
&lt;p&gt;1: You need to be able to fetch all the data that you at a some point want to display on the screen, but start with checking that you are able to view it in the log.&lt;/p&gt;
&lt;p&gt;2: You need to be able to communicate with the screen.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am not sure whether you have started looking into any of these yet, but I suggest that you try to separate these tasks first.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For 2), I suggest that you look into the example found in:&lt;/p&gt;
&lt;p&gt;SDK\examples\peripheral\gfx, as this is an LCD screen example. If you use another LCD screen than the ones supported in this example, you must find some drivers that works for your screen. You can find the testing description for this example&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/gfx_example.html?cp=7_1_4_6_13_1#gfx_example_testing" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>