{"id":22980567,"url":"https://github.com/dinau/nimonavr","last_synced_at":"2025-08-13T17:33:23.118Z","repository":{"id":45654804,"uuid":"430896241","full_name":"dinau/nimOnAVR","owner":"dinau","description":"Nim language test program for Arduino UNO/Nano or its compatibles ","archived":false,"fork":false,"pushed_at":"2023-06-15T08:03:01.000Z","size":78,"stargazers_count":27,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-25T02:33:19.069Z","etag":null,"topics":["arduino","avr","blink","c2nim","dimmer","led","nano","nim","nim-lang","pwm","sd","sd-card","spi","uart","uno","usart"],"latest_commit_sha":null,"homepage":"","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dinau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-11-22T23:26:43.000Z","updated_at":"2024-10-17T09:47:23.000Z","dependencies_parsed_at":"2023-02-02T05:02:09.290Z","dependency_job_id":"efd79ce7-6149-4b82-9634-468eb8a81a71","html_url":"https://github.com/dinau/nimOnAVR","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2FnimOnAVR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2FnimOnAVR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2FnimOnAVR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2FnimOnAVR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dinau","download_url":"https://codeload.github.com/dinau/nimOnAVR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229773548,"owners_count":18122031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","avr","blink","c2nim","dimmer","led","nano","nim","nim-lang","pwm","sd","sd-card","spi","uart","uno","usart"],"created_at":"2024-12-15T01:44:15.259Z","updated_at":"2024-12-15T01:44:15.969Z","avatar_url":"https://github.com/dinau.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- TOC --\u003e\n\n- [Nim On AVR](#nim-on-avr)\n    - [Nim language test program for Arduino UNO/Nano](#nim-language-test-program-for-arduino-unonano)\n        - [Prerequisite](#prerequisite)\n        - [AVR peripheral register access](#avr-peripheral-register-access)\n        - [Example1](#example1)\n            - [**LED blink** ](#led-blink)\n            - [**nimOnArduino** ](#nimonarduino)\n            - [**UART** ](#uart)\n            - [**UART_LED** ](#uart_led)\n            - [**Struct_Test_CMake** ](#struct_test_cmake)\n        - [Example2](#example2)\n            - [**Intr_Test** ](#intr_test)\n            - [**SD_Card** ](#sd_card)\n        - [Other links1](#other-links1)\n        - [Other links2](#other-links2)\n\n\u003c!-- /TOC --\u003e\n  \n\n#                            Nim On AVR\n##    Nim language test program for Arduino UNO/Nano\n\n### Prerequisite\n* [nim-1.6.0](https://nim-lang.org/install.html)  \n    * **Important**:  \n        * It must be used above nim version otherwise it won't work well.\n* avr-gcc v7.3.0 (inclued in [arduino-1.8.16 IDE](https://www.arduino.cc/en/software))  \n    * For example, if on Windows10 set executable path to  \n         **d:\\arduino-1.8.16\\hardware\\tools\\avr\\bin**  \n* make,rm and etc Linux tool commands\n* [CMake](https://cmake.org/download/) version 3.13 or later  \n\n### AVR peripheral register access\n* Load / Store operation\n    * Load from peripheral register\n        ```Nim\n         var \n            inData1 = PORTB.v\n            inData2 = PORTB.ld  # same as above\n         ```\n    * Store to peripheral register \n        ```Nim\n         PORTD.v = 123  \n         PORTD.st 123   # same as above\n         PORTD.st(123)  # same as above\n         ```\n* Bit operation\n    * 1 bit\n        ```Nim\n        PORTB.b3 = 1             # bit set\n        PORTB.b7 = 0             # bit clear \n        # Note: (bx: x = 0..7 )\n        var \n            bitdata = PORTD.b2   # bit read\n        ```\n    * Multi bits\n        ```Nim\n            # Set / clear multi bits at a time specifiying bit name.\n            PORTC.bset [PORTC0,PORTC1,PORTC6,PORTC7]  \n            SPCR.bclr [SPR0,SPR1] \n        ```\n    * BV() function\n        ```Nim\n        SPCR.v = BV(SPE) + BV(MSTR)\n        ```\n    * See also [reg_utils.nim](https://github.com/dinau/nimOnAVR/blob/main/example2/common/lib/reg_utils.nim)\n\n    * Peripheral register definition file\n        * [iom328p.nim](https://github.com/dinau/nimOnAVR/blob/main/example2/common/avr/iom328p.nim) converted from [iom328.h](https://github.com/vancegroup-mirrors/avr-libc/blob/master/avr-libc/include/avr/iom328p.h) by c2nim and by hand (-:\n        * [str_defs.nim](https://github.com/dinau/nimOnAVR/blob/main/example2/common/avr/sfr_defs.nim) converted from [str_defs.h](https://github.com/vancegroup-mirrors/avr-libc/blob/master/avr-libc/include/avr/sfr_defs.h) \n        \n### Example1\n#### **LED blink** \n* Simple \u003cspan style=\"color: darkgreen; \"\u003eLED\u003c/span\u003e blinker program.  \n\n    ```\n    $ cd example1/led  \n    $ make  \n    ```\n    ```sh\n    $ make \n    ........................................................\n    CC: stdlib_system.nim\n    CC: delay.nim\n    CC: main.nim\n    Hint:  [Link]\n    Hint: gc: arc; opt: speed; options: -d:danger\n    51065 lines; 2.461s; 49.953MiB peakmem; proj: src\\main; out: D:\\nim-data\\avr\\nimOnAVR\\example1\\led\\.BUILD\\main.elf [SuccessX]\n       text    data     bss     dec     hex filename\n        234       0       0     234      ea .BUILD\\main.elf\n    ```\n    You can use make command for build management as follows,\n    ```sh\n    $ make # build target\n    $ make clean # clean target\n    $ make w # upload to flash\n    ```\n    or,\n    ```sh\n    $ nim make # build target\n    $ nim clean # clean target\n    $ nim w # upload to flash\n    ```\n* Artifacts (`*`.hex,`*`.lst files etc) would be generate to **.BUILD** folder.\n* Code: src/main.nim\n\n    ```Nim\n    import iom328p,delay\n\n    # LED setting\n    proc led_setup() = DDRB.b5  = 1\n    proc led_on()    = PORTB.b5 = 1\n    proc led_off()   = PORTB.b5 = 0\n\n    # main program\n    proc main() =\n        led_setup()\n        while true:\n            led_on()\n            wait_ms(1000)\n            led_off()\n            wait_ms(1000)\n\n    main()\n    ```\n* Upload(write to Flash) the generated file to Arduino board\n    * For instance Arduino Uno,\n        ```\n        $ make w \n        ```\n        * Constant **ARDUINO_VER, COM_PORT, AVRDUDE_BAUDRATE** in **config.nims** must be properly set\n            accoding to your envionment.  \n            See ./[config.nims](https://github.com/dinau/nimOnAVR/blob/main/example1/led/config.nims)\n            * cf.\n                ```\n                  Arduino Uno:       AVRDUDE_BAUDRATE=115200\n                  Arduino Nano:      AVRDUDE_BAUDRATE=115200 \n                  Arduino Nano(old): AVRDUDE_BAUDRATE=57600 \n                ```\n        ```sh  \n        $ make w\n        ........................................................\n        Hint:  [Link]\n        Hint: gc: arc; opt: speed; options: -d:danger\n        51065 lines; 3.046s; 49.906MiB peakmem; proj: src\\main; out: nimOnAVR\\example1\\led\\.BUILD\\main.elf [SuccessX]\n           text    data     bss     dec     hex filename\n            234       0       0     234      ea .BUILD\\main.elf\n\n        avrdude.exe: AVR device initialized and ready to accept instructions\n\n        Reading | ################################################## | 100% 0.01s\n\n        avrdude.exe: Device signature = 0x1e950f (probably m328p)\n        avrdude.exe: erasing chip\n        avrdude.exe: reading input file \".BUILD\\main.elf\"\n        avrdude.exe: input file .BUILD\\main.elf auto detected as ELF\n        avrdude.exe: writing flash (234 bytes):\n\n        Writing | ################################################## | 100% 0.10s\n\n        avrdude.exe: 234 bytes of flash written\n        avrdude.exe: verifying flash memory against .BUILD\\main.elf:\n        avrdude.exe: load data flash data from input file .BUILD\\main.elf:\n        avrdude.exe: input file .BUILD\\main.elf auto detected as ELF\n        avrdude.exe: input file .BUILD\\main.elf contains 234 bytes\n        avrdude.exe: reading on-chip flash data:\n\n        Reading | ################################################## | 100% 0.08s\n\n        avrdude.exe: verifying ...\n        avrdude.exe: 234 bytes of flash verified\n\n        avrdude.exe done.  Thank you.\n        ``` \n\n#### **nimOnArduino** \n* Simple \u003cspan style=\"color: darkgreen; \"\u003eLED\u003c/span\u003e blinker program.  \n    * [Referred from 'Nim on Arduino'](https://disconnected.systems/blog/nim-on-adruino/)\n        ```\n        $ cd example1/nimOnArduino  \n        $ make\n        ```\n        ```sh\n        $ make\n        ...................................................\n        CC: led\n        CC: stdlib_system.nim\n        CC: blink.nim\n        Hint:  [Link]\n        Hint: gc: arc; opt: speed; options: -d:danger\n        49796 lines; 2.468s; 49.953MiB peakmem; proj: .\\blink; out: nimOnAVR\\example1\\nimOnArduino\\.BUILD\\blink.elf [SuccessX]\n           text    data     bss     dec     hex filename\n            234       0       0     234      ea .BUILD\\blink.elf\n\n        ```\n    * Code: ./blink.nim , [led.c](https://github.com/dinau/nimOnAVR/blob/main/example1/nimOnArduino/led.c)\n\n        ```Nim\n        {.compile: \"led.c\".}\n        proc led_setup():   void {.importc.}\n        proc led_on():      void {.importc.}\n        proc led_off():     void {.importc.}\n        proc delay(ms:int): void {.importc.}\n\n        when isMainModule: \n            led_setup()\n            while true:\n                led_on()\n                delay(1000)\n                led_off()\n                delay(1000)\n        ```\n\n#### **UART** \n* Simple \u003cspan style=\"color: darkgreen; \"\u003eUART\u003c/span\u003e test program with ChaN's xprintf() functions.\n    * Set baudrate 38400bps to your terminal program.\n        ```\n        $ cd example1/uart  \n        $ make\n        ```\n    * Code: [src/main.nim](https://github.com/dinau/nimOnAVR/blob/main/example1/uart/src/main.nim)\n\n        ```Nim\n        ...\n        # UART setting\n        ...\n        # main program\n        proc main() =\n            initUart(mBRate(BAUDRATE))\n            var num = 0\n            while true:\n                xprintf(\"\\n Number = %d\", num)\n                xputs(\"---\")\n                num += 1\n                wait_ms(1000)\n        main()\n        ```\n\n#### **UART_LED** \n* Just mixed \u003cspan style=\"color: darkgreen; \"\u003eUART\u003c/span\u003e and \u003cspan style=\"color: darkgreen; \"\u003eLED\u003c/span\u003e blinker test program.\n    * Set baudrate 38400bps to your terminal program.\n        ```\n        $ cd example1/uart_led  \n        $ make\n        ```\n    * Code: [src/main.nim](https://github.com/dinau/nimOnAVR/blob/main/example1/uart_led/src/main.nim)\n        ```Nim\n        ...\n        # UART setting\n        ...\n        # LED setting\n        proc led_setup() = DDRB.b5  = 1\n        proc led_on()    = PORTB.b5 = 1\n        proc led_off()   = PORTB.b5 = 0\n\n        # main program\n        proc main() =\n            led_setup()\n            initUart(mBRate(BAUDRATE))\n\n            var num = 0\n            while true:\n                led_on()\n                wait_ms(500)\n                led_off()\n                wait_ms(500)\n                xprintf(\"\\n Number = %d\", num)\n                xputs(\"---\")\n                num += 1\n        main()\n        ``` \n#### **Struct_Test_CMake** \n* Simple test, object(struct) data interchanging between Nim and C language. \n    * Set baudrate 38400bps to your terminal program.\n        ```\n        $ cd example1/struct_test_cmake  \n        $ make\n        ```\n        * This project is using [**CMake**](https://cmake.org/) to resolve dependency for C language files.\n            * It's needed to install CMake v3.13 or later. \n        * Artifacts (`*`.hex,`*`.lst files etc) would be generate to **.build_cmake** folder.\n    * Type definition on Nim\n        * Code [src/main.nim](https://github.com/dinau/nimOnAVR/blob/main/example1/struct_test_cmake/src/main.nim)\n            ```Nim\n            type\n                Student* {.byref.} = object\n                    age*:uint16\n                    cstringName*:cstring\n                    arrayName*: array[7,char]\n            ...\n            var\n                std:Student\n            ...\n            show_and_modify_by_c_lang(std)\n            ...\n\n            ```\n            ```Nim\n            proc show_and_modify_by_c_lang(std:var Student){.importc,cdecl.}\n            ```\n    * Type definition on C language\n        * Code [src/student.h](https://github.com/dinau/nimOnAVR/blob/main/example1/struct_test_cmake/src/student.h)\n            ```C\n            typedef struct Student {\n                uint16_t age;\n                char *cstringName;\n                char arrayName[7];\n            } Student;\n            ```\n        * Code [src/student.c](https://github.com/dinau/nimOnAVR/blob/main/example1/struct_test_cmake/src/student.c)\n            ```C\n            void show_and_modify_by_c_lang(Student *std){\n                ...\n            }\n            ```\n    * Terminal output:\n        ```\n         === Showing std object in Nim ===\n         Age         = 20\n         cstringName = my_name_cstring\n         arrayName   = ['A', 'B', '\\x00', '\\x00', '\\x00', '\\x00', '\\x00']\n\n         \u0026std.age            = 0x000008d9\n         \u0026std.cstringName    = 0x000008db\n         \u0026std.arrayName      = 0x000008dd\n         \u0026std.cstringName[0] = 0x00000636\n         \u0026std.arrayName[0]   = 0x000008dd\n\n        Calling C function: show_and_modify_by_c_lang(std)\n\n         ======= Received the object pointer of std from Nim at C language function =======\n            std.Age = 20\n            std.cstrinName  = my_name_cstring\n            std.arrayName   = AB\n\n            \u0026std.Age            = 0x000008d9\n            \u0026std.cstringNname   = 0x000008db\n            \u0026std.arrayName      = 0x000008dd\n            \u0026std.ctringNname[0] = 0x00000636\n            \u0026std.arrayName[0]   = 0x000008dd\n\n            Now changing the object data as follows,\n              std-\u003eage += 50;\n              std-\u003ecstringName[0]='0';\n              std-\u003ecstringName[1]='1';\n              std-\u003ecstringName[2]='\\0';\n\n              std-\u003earrayName[0]  ='1';\n              std-\u003earrayName[1]  ='2';\n              std-\u003earrayName[2]  ='3';\n              std-\u003earrayName[3]  ='4';\n              std-\u003earrayName[4]  ='5';\n              std-\u003earrayName[5]  ='\\0';\n\n         ============ in C language function end =======\n\n        === Showing std object modified by C function ===\n        Age         = 70\n        cstringName = 01\n        arrayName   = ['1', '2', '3', '4', '5', '\\x00', '\\x00']\n        --- [ xprintf test ! ] ---\n        ```\n\n### Example2\n####  **Intr_Test** \n* Simple \u003cspan style=\"color: darkgreen; \"\u003eInterrupt/SPI/PWM/UART\u003c/span\u003e test program with ChaN's xprintf() functions.\n    * Set baudrate 38400bps to your terminal program.\n        ```\n        $ cd example2/intr_test\n        $ make\n        ```\n        * Terminal output:\n            * If you wires D11(MOSI) with D12(MISO), SPI error will be gone away (=\u003e0) because of loopback connection established.\n                ```sh\n                ...\n                [00181]\n                     45504 Hz: PWM [44100 Hz] period interrupt freq.(Approximately)\n                  8282546:     SPI [D11-\u003eD12] error count in PWM period interrupt.\n                ...\n                ```\n        * SPI pins\n            * Chip select: D8(PB0) and D4(PD4)\n            * MISO: D12(PB4), MOSI: D11(PB3)\n            * SCK: D13(PB5)\n        * If you have oscilloscope, it could be observed PWM signal(period=44.1kHz) at D9,D10 pin.\n    * Code: [src/main.nim](https://github.com/dinau/nimOnAVR/blob/main/example2/intr_test/src/main.nim)\n        ```Nim\n        # main program\n        proc main() =\n            initPort()\n            initSystick()\n            when UART_INFO:\n                initUart(mBRate(UART_BAUDRATE)) # 38400bps\n            initSpi()                           # SCK=8MHz\n\n            initPwm()                           # PWM setting\n            setPwmPeriod(PWM_FREQ)              # PWM frequency = 44100 Hz\n            enablePwmPeriodIntr()               # Enable PWM period interrupt\n            pwm_period_timer_start()            # PWM period Timer start\n\n            pwm_dutyL(200)                      # D9\n            pwm_dutyR(50)                       # D10\n\n            setUserTicks(1000)\n            ei()                                # Enable all interrupt\n\n            var\n                ix:int16 = 0\n                prev:int32 = 0\n            while true:\n                if isTickTrigger():\n                    clearTickTrigger()\n                    disablePwmPeriodIntr()\n                    let pwmCounter = pwmIntrCounter # int32\n                    enablePwmPeriodIntr()\n                    xprintf(\"\\n[%05d]\",ix)\n                    xprintf(\"\\n     %5ld Hz: PWM [44100 Hz] period interrupt freq.(Approximately)\", pwmCounter - prev)\n                    prev = pwmCounter\n                    xprintf(\"\\n    %9ld:     SPI [D11\u003c-D12] error count in PWM period interrupt.\",spi_err)\n                    inc(ix)\n        # Run main\n        main()\n        ```\n\n#### **SD\\_Card** \n* This program shows \u003cspan style=\"color: darkgreen; \"\u003eSD card\u003c/span\u003e low-level initialize info and file list in root folder.\n    * Set baudrate 38400bps to your terminal program.\n        ```\n        $ cd example2/sd_card\n        $ make\n        ```\n    * Code [src/main.nim](https://github.com/dinau/nimOnAVR/blob/main/example2/sd_card/src/main.nim)\n        ```Nim\n        when UART_INFO:\n            {.compile:\"xprintf.c\".}\n\n        template initPort*() =\n        # set pull up to i/o port.\n            PORTB.v = 0xFF\n            PORTC.v = 0xFF\n            PORTD.v = 0xFF\n            DDRB.v =  0xEF # all output except PB4\n            DDRD.v =  0xFF # all output port\n\n        # main program\n        proc main() =\n            initPort()\n            initSystick()\n            when UART_INFO:\n                initUart(mBRate(UART_BAUDRATE)) # 38400bps\n            initSpi()                       # SCK=8MHz\n            ei()                            # enable all interrupt\n\n            while not sd_init():            # SDSC,SDHC initialize\n                wait_ms(1500)\n            FAT_init()                      # Accept FAT16 and FAT32\n            for _ in 1..3:                  # Show the information of first 3 files.\n                searchNextFile()\n\n        # Run main\n        main()\n        ```\n\n    * Terminal output: [(Full output)](https://github.com/dinau/nimOnAVR/blob/main/example2/sd_card/sd_card_show_init_info.txt)\n        ```sh\n        [sd_card.nim] Start SD card init\n        --- Found: SDv2 !\n        --- --- ACMD41 OK\n        --- --- --- Found: SDSC None Block Mode : CMD58\n        [Finished!]: OK!  SD card init\n        [fat_lib.nim/FAT_init()] Start MBR/FAT read\n        MBR is:\n         0000:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0020:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0030:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0040:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0050:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0060:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0070:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0080:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0090:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         00A0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         00B0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         00C0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         00D0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         00E0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         00F0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0100:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0110:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0120:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0130:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0140:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0150:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0160:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0170:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0180:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         0190:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         01A0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         01B0:00 00 00 00 00 00 00 00 FD 3D DE 19 00 00 00 03\n         01C0:3F 00 06 17 D7 D7 FB 00 00 00 05 7F 3C 00 00 00\n         01D0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         01E0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n         01F0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA\n        BPB_Sector[0x01C6] = 0x00FB [th sector]\n        BPB_Info is:\n         EB 00 90 4D 53 57 49 4E 34 2E 31 00 02 40 01 00 02 00 02 00 00 F8 F2 00 3F 00 40 00 FB 00 00 00\n            dwBPB_SecPerFats32 = 242\n            bBPB_NumFATs       = 2\n            wBPB_RsvdSecCnt    = 1\n            dwBPB_HiddSec      = 251\n            lgdwRootdir_sector = 736\n            lgwSize_of_root    = 16384\n            lgwBPB_RootEntCnt  = 512\n            lgbBPB_SecPerClus  = 64\n            lgwBPB_BytesPerSec = 512\n        File entries(FENT) of 32byte are:\n        FENT: 42 20 00 49 00 6E 00 66 00 6F 00 0F 00 72 72 00 6D 00 61 00 74 00 69 00 6F 00 00 00 6E 00 00 00\n        asci:  B        I     n     f     o           r  r     m     a     t     i     o           n\n        File entries(FENT) of 32byte are:\n        ....\n        ....\n        skip the rest\n        ```\n    * SD card setup procedure\n        1. Format SD card using [SDFormatter](https://www.sdcard.org/downloads/formatter/)\n        program.\n        1. Copy sample files to root folder on your PC.\n\n    * FAT Filesystem reference\n        [FAT Filesystem](http://elm-chan.org/docs/fat_e.html)\n\n### Other links1\n* [Arduino for Nim](https://github.com/markspanbroek/nim-arduino)\n* [Nim for PlatformIO](https://github.com/markspanbroek/nim-platformio)\n* [Nim for Arduino](https://github.com/zevv/nim-arduino)\n* [Arduino temp](https://github.com/Sinsjr2/arduino_temp)\n\n### Other links2\n* Wave player project Super lite series\n    * Nim language\n        * [Arduino Wave Player PWM Super Lite Nim / Nim](https://github.com/dinau/arduino-wave-player-pwm-super-lite-nim) Completed.\n        * [STM32 Wave Player PWM Super Lite Nim / STM32(F0,L1,F3,F4)  Nim](https://github.com/dinau/stm32-wave-player-pwm-super-lite-nim) Completed. \n    * C++ language\n        * [Wave Player Super Lite / STM32(F0,L1,F4) / Mbed2 / C++](https://os.mbed.com/users/mimi3/code/wave_player_super_lite) Completed.\n    * Jal language\n        * [Pwm Wave Player Jalv2 / PIC16F1xxx / Jal](https://github.com/dinau/16f-wave-player-pwm-super-lite-jalv2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinau%2Fnimonavr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdinau%2Fnimonavr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinau%2Fnimonavr/lists"}