單片機
u013606170
这个作者很懒,什么都没留下…
展开
-
Putchar in Keil C, take 8051 as an instance
In Keil C, it is necessary to implement char putchar(char c), or the powerful function printf would not work. We should notice in here : new line command for serial output be "\r\n" (line feed:LF,原创 2015-04-29 03:06:51 · 1282 阅读 · 0 评论 -
nRF51/nRF52 Runs BLE Peripheral and ESB Protocol Concurrently
The code for this post ishere. Continue myprevious postabout Nordic's Enhanced Shockburst™(ESB) reliable transceiving, In this post I would like to discuss how to combine ESB with Bluetooth l...原创 2018-12-06 00:38:02 · 627 阅读 · 0 评论 -
USB HID Host on Windows : Based on SiLab C8051 Example Firmware, USBHIDtoUART (Replace SLABHIDDEVIC
C8051 (F34X/F32X and F38X) series released by Silicon Labs is very famous and popular microcontroller for its bargain price and multipurpose for the applications : the chips are based on 8...原创 2018-01-08 02:20:22 · 776 阅读 · 0 评论 -
Make Nordic Enhanced ShockBurst™ (ESB) Transceivers as Multiceiver and Reliable
※This post focuses on nRF24LE1, if you are interested in how to use an independent microcontroller to control NRF24L01, please refer tomy another post. ※ The multi-sending and multi-receivin...原创 2018-11-21 03:18:05 · 516 阅读 · 0 评论 -
ESP8266 RTOS : Device Firmware Update Over the Air (DFU-OTA) via the Private Server
ESP8266 is a very popular micro-controller featuring WIFI with its bargaining price. There are some product based on ESP8266/ESP8285 (ESP8285 = ESP8266 embedded 1 MB flash) for home IoT using. T...原创 2018-05-05 14:39:32 · 827 阅读 · 0 评论 -
C8051 USB Device : Enable 2 Endpoint Pair as 2 Different Devices
※ The full code I have modified you could download inhere. There is 8 USB endpoints in Silicon Labs's C8051F3X0, but there is few post or discussion about how to enable multi-pair end...原创 2018-01-18 03:34:56 · 351 阅读 · 0 评论 -
C8051 USB Device : Modify the MouseExample Code as UART-Input Mouse.
I found the example code of silicon labs's MouseExample is not explicit: the input signal is from analog to digital converter (ADC) pin: it blurs the key-point for it is an USB exa...原创 2018-01-18 03:21:37 · 359 阅读 · 0 评论 -
USB HID Host on Linux : Based on SiLab C8051 Example Firmware, USBHIDtoUART
This post implementation the Linux host of SiLab 's C8051 firmwar example code : USBHIDtoUART, to complementary my previous post, the same stuff on Windows. The code be : #include <linux/limits...原创 2018-01-08 02:25:09 · 360 阅读 · 0 评论 -
nRF51 : Make the Printf to Work Well
You may encounter a problem that when you follow the standard UART(Universal Asynchronous Receiver/Transmitter) step, but the printf would not work well. the Standard UART code in Nordic example be (原创 2017-01-04 14:20:28 · 396 阅读 · 0 评论 -
nRF51/52 ROM Protection : Prevent Someone Else From Dumping the Hex File
To avoid piracy is very important for software and firmware development. Of course, you should protect your source code would not be spread out. But from firmware prospect, it is a way to piracy your原创 2017-04-20 15:38:05 · 1180 阅读 · 0 评论 -
nRF51/52 : Disable Unused GPIOs
By this forum thread, for unused GPIOs in nRF51822/nRF52832, programmer should set those as input pin, and set those in disconnection (from input buffer). Following the rule, the code be: //原创 2017-04-04 23:44:43 · 682 阅读 · 0 评论 -
BLE Gatt Date Time Service Implimentation in nRF51/52
There are current time client library(components\ble\ble_services\ble_cts_c) and example code(examples\ble_peripheral\ble_app_cts_c) in the nRF SDK : the nRF device would adjust its real timer while t原创 2017-02-09 09:13:50 · 1074 阅读 · 0 评论 -
nRF51/52 : Pstorage (Flash , Non-volatile Memory) Operation
It is very requisite for internet of thing (IoT) application to have a non-volatile memory, it could keep the status when the battery runs out. In nRF51/52 series, the flash is called as "Persiste原创 2017-01-04 14:29:27 · 1532 阅读 · 0 评论 -
STM8L Power Saving : How to Implement Auto Wake-Up Mode in STM8L101xx
In this document (4.2.1): The STM8L101xx devices feature the following main low power modes: Wait mode: CPU stopped and peripherals kept running - Wait RTC (peripheral module) i原创 2016-11-07 01:23:10 · 815 阅读 · 0 评论 -
CC2540/CC2541 : Change Scan Response Data( SRP) dynamically
How to change the SRP data is a very imperative for most bluetooth low energy use case. But in official Texas Instruments(TI) example code, there is no demonstration for this purpose. In here, I note原创 2015-04-27 00:03:43 · 2598 阅读 · 1 评论 -
CC2540/2541 : Change Advertising Data And Scan Response Without Rebooting.
From my previous article , I mention a method to change advertise data and scan response data by reboot. It is work, but it is not suit for change these 2 data frequently. In here, I note a wa原创 2015-08-22 08:58:03 · 1201 阅读 · 0 评论 -
Use STM8 to Control nRF24L01
※The complete code is available inhere. Inmy previous post, I used nRF24LE1, which is an 8051 microcontroller(MCU)integratednRF24L01 function, to operate Enhanced Shockburst™ (ESB) transceiving....原创 2019-01-13 19:13:34 · 486 阅读 · 0 评论