SerialTool | A cross platform Serial-Port/TCP/UDP debugging tool | Networking library
kandi X-RAY | SerialTool Summary
kandi X-RAY | SerialTool Summary
A practical Serial-Port/TCP/UDP debugging tool.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of SerialTool
SerialTool Key Features
SerialTool Examples and Code Snippets
Community Discussions
Trending Discussions on SerialTool
QUESTION
I am playing around with a DFRobot Romeo board that has an ATmega328p MCU on it.
I wrote a program to transmit the binary and decimal representation of 4 DIP switches wired as inputs into PORTD (PD2 -> PD5). UART is wired to PORTD, PD0 (Rx) and PD1 (Tx).
The program works as expected except for when the program first runs the terminal emulator I am using on my Mac appears to receive and display the following binary/decimal number: 00000011 3
, then 00000000 0
appears, or whatever number is set by the DIP switches.
If I reset the controller with the UART connection maintained, I get the same result over and over. The terminal emulator I am using is CoolTerm. I get the same result even if I flush the buffer before reconnecting. The same result is occurring if I try another terminal emulator (i.e. Serial, SerialTools).
I reviewed my code, and do not see any obvious errors. I contacted a peer who says he has seen this behaviour as well, but has no suggestions for a solution other than clearing the terminal buffer. I have also tried a few different physical configurations such as powering the board by USB only, powering the board from a separate power supply without the USB programming cable connected, and with the USB cable connected. I get the same results on the Terminal.
Can someone take a look at this and offer a suggestion as to why this behaviour is occurring?
Here is the C code for the program.
...ANSWER
Answered 2019-Nov-01 at 13:34Maybe there is not enough time between enabling the weak pull-ups and the first sampling.
Try to put a delay before the loop!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install SerialTool
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page