UART and NOKIA_5110 and arbitrary frequency generator

        After the summer decadence for a long time, there has been no transfer of things, busy rectify Radio Association, in idle apart, brother received a gray task, first of all, do yourself a minimum system board (plus serial port), and then send the data to the computer microcontroller, for instance 1024, and then displays "1024HZ" in 5110, and the microcontroller emitted square wave of 1024Hz. On such a task, I have not let people touch SCM ... encountered many difficulties, it is now complete, so write some feelings and experiences.

        Difficult one: I do not know what is UART transmit data? ? ? ACSII is it? Or char it? what is this else…

                    Solve one: finally found UART transmission is ACSII.

        Difficulties in two: how to achieve emission and realistic at the same time.   

                    Solving two: establishing a judgment while (), the judgment is satisfied, it is displayed. If not satisfied, the transmit waveform, because the judge will not take up too much time to time, is negligible.

        Difficulty three: Unable string UART transmission data is converted to an int stored.

                    Solve three: to create a function that will ACSII minus 48 yards, just good is int type integer

       Difficult four: I want to display when the display unit 5110 HZ in the back, I did not expect, PC input "123" when the 5110 above necessarily show "1HZ2HZ3HZ".

                    Solve four: the original UART transmit data when a number is a pass, pass a number of times on the show in 5110 a number of the above, not all of a sudden show together. Knowing this, you know the way to deal with it.

        The basic problem encountered by these friends, the most important is the program tune out, a little excited, did not personally, really do not know the difficulty of them.

Reproduced in: https: //www.cnblogs.com/chenxukai/archive/2010/10/01/1840677.html

Guess you like

Origin blog.csdn.net/weixin_33675507/article/details/93480314