Posts

HowToGetRidOfFibreBroadband

  20241026.6 1. Hot Spot      If the handphone has the hot spot function, turn it on.  The WiFi name is usually generated by default. The password can be easily changed. This allows another device such as a PC to log in and access the  internet. The transfer speed may not be very fast.      With the hot spot turned on, it is also possible to connect the handphone to the PC with an USB cable. The internet speed will increase greatly.

CH32V307KCS

  2023 20221203.6     Timer 6 int main(void) {     //u16 i ; NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); Delay_Init();     USART_Printf_Init(115200);     printf("SystemClk:%d\r\n",SystemCoreClock);     printf("This is printf example\r\n");     GPIO_InitTypeDef GPIO_InitStructure = {0};             RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, DISABLE);             RCC->APB2PCENR |= 0x04 ;   //RCC_APB2PCENR  RCC->APB2PCENR             GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15;             GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;             GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;             GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_WriteBit(GPIOA, GPIO_Pin_15, 1); //Bit_SET  Bit_RESET RCC->APB1PCENR |= 1<<4 ; //TIM6->ATRLR = 0x0000 ; TIM6->PSC = 0xFFF ; TIM6->CTLR1 = 0x01 ; while(1)     {     //GPIO_WriteBit(GPIOA, GPIO_Pin_15, 1);     //while((TIM6->INTFR&0x01)==0);

CH552KCS

 20221019.3 These two sites are useful: [沁恒单片机系列]一、Keil中添加沁恒单片机型号_Magnin的博客-CSDN博客 CH551、CH552、CH554 、CH558、CH559下载步骤_zfysis的博客-CSDN博客_ch554 20221021.5 I came across the 6800 in the early 1980s. But the ROMless Intel 8031 was the first microcontroller I tried to develop. Using a large breadboard, I used an UV-EPROM to make the 8031 running endlessly. Then using the asynchronous RS232 port, I arranged for a program, written in assembly language, to be downloaded into a RAM chip and executed by the 8031. Othe microcontrollers and microprocessors were similarly tested without using the costly emulator. The set up was most simple with the MC68HC811E2, which was used in some student projects. That was long ago. It seems the RS232 is making a come-back, even though the USB has removed the physical RS232 port. Here comes the CH552, an 8031 with the USB, and the SPI replacing the old shift register.

ATmega16KCS

Image
20221007.5 Continue from:  Programming Microcontrollers: ATMEGA16A (programmingmicrocontrollerskohcs.blogspot.com) IAR Embedded Workbench for Microchip AVR 7.30.5 AVRDUDESS 2.14 20221008.6 This would be a rather straight forward set up for the hardware. Although it is a continuation, some rewriting may be useful. IAR Embedded Workbench             Create a New C main Project             Select ATmega16 as the processor             Select ‘Other’ for the linker output             Make the active project   AVRDUDESS             Select the appropriate programmer             Detect the MCU             Open the ‘.90’ file produced by the Workbench             Flash the file to the ATmega16                         Some 100+ bytes would be written. 20221009.7 The following program would toggle an LED (with a series resistor) connected to Port A bit 0. //  AT01LEDt    Toggle Port A bit 0     iRC 1 MHz  #include <iom16.h> int main( void ) {   int i;   PORTA &= ~

PyBoard405KCS

20220926.1 20220927.2 This PyBoard405 was purchased in April 2021 for about S$20. It is now costing much more than that. I was struggling to use it with some IDE for sometimes, practising python, before I left it in a corner. Now that after the uPyCraft IDE is installed, I can pick it up again. 202209

ESP32KCS

Image
 20220916.5 The ESP32 board costs less than S$5 and the 128x64 OLED tied to it costs less than S$3. I have to buy the 1-metre USB C cable for this board. It costs less than S$3. The items took one to two weeks to arrive. But I can wait. It would be nice if I can program the board in C. But it is quite difficult. So, I have to settle for micro-python. 20220917.6   IDE After getting the board, it is usually necessary to flash the MicroPython firmware to the ESP32.  This procedure is described in the site:   Flash/Upload MicroPython Firmware to ESP32 and ESP8266 | Random Nerd Tutorials  . The uPyCraft IDE installed, as described, will also be used in programming the ESP32. For the board shown above, it is also necessary to install the CH340 driver. Then the board can be connected to the computer and the firmware flashed to the ESP. Using the uPyCraft IDE requires some exploration. For example, clicking Help|Tutorial online will lead to a guide on MicroPython for the ESP32, in Chinese. Wit