• AVR Freaks

Hot!USART PIC16F877A

Page: < 12 Showing page 2 of 2
Author
PStechPaul
Super Member
  • Total Posts : 2342
  • Reward points : 0
  • Joined: 2006/06/27 16:11:32
  • Location: Cockeysville, MD, USA
  • Status: offline
Re: USART PIC16F877A 2019/07/20 14:17:06 (permalink)
0
I am not familiar with the Linux TTY application. Searching came up with these links, some of which are a bit confusing:
 
http://www.linusakesson.net/programming/tty/index.php
 
Perhaps some good info here for other ways to implement a terminal in Linux:
 
https://askubuntu.com/questions/40959/how-do-i-connect-to-tty-com-dev-ttyusb0
 
Maybe the terminal is not properly configured for start/stop/parity bits?

 
#21
rbraddy
New Member
  • Total Posts : 9
  • Reward points : 0
  • Joined: 2018/01/23 20:07:19
  • Location: 0
  • Status: offline
Re: USART PIC16F877A 2019/07/20 15:05:50 (permalink)
0
I'm using PIC16LF18345 (and PIC12LF1822 and others) with USART to communicate with the PC. Have had no issues with baud rates or communications reliability. I am using fixed baud rates, not auto-rate detection.
 
I'm also using low-power SLEEP() with USART RX interrupts to wake up the PIC from nanoamp level deep sleep. What I find is during wakeup one or two characters can be lost while clocks stabilize, but from that point forward everything is reliable. So no issues between PC and PIC baud rates using USB adapter from PC.
#22
delfindelfin
Super Member
  • Total Posts : 374
  • Reward points : 0
  • Joined: 2017/01/19 12:32:58
  • Location: Mexico
  • Status: offline
Re: USART PIC16F877A 2019/07/20 15:50:55 (permalink)
0
I am using Windows as a Guest OS through Virtual Box .. Do you know how can I add Serial Ports in a Windows Guest machine using Linux as a Host using Virtual Box?
post edited by delfindelfin - 2019/07/20 15:52:00

MPLAB X IDE v5.05
XC8 2.00
#23
ric
Super Member
  • Total Posts : 23180
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: USART PIC16F877A 2019/07/20 15:53:12 (permalink)
+1 (1)
delfindelfin
I am using Windows as a Guest OS through Virtual Box ..

I suspect this may be causing your problems. It's the receiver missing data in rapid streams.

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#24
delfindelfin
Super Member
  • Total Posts : 374
  • Reward points : 0
  • Joined: 2017/01/19 12:32:58
  • Location: Mexico
  • Status: offline
Re: USART PIC16F877A 2019/07/20 16:28:12 (permalink)
0
No .. Currently I am using Ubuntu and the commands I posted in #15 .. Now, I want to use Windows to use Tera Term and see if I have the same problem .. But I am using Windows in a Virtual Machine ... For a long time I wanted to know how to add Serial Ports in Virtual Box since I also wanted to use Arduino IDE in Windows .. But .. I am unable to fix the problem ..
 
Edit: Oh, I have already fixed it .. But it is the same the problem on Windows, or Linux, On Screen, Putty or Tera Term 
post edited by delfindelfin - 2019/07/20 16:47:56

Attached Image(s)


MPLAB X IDE v5.05
XC8 2.00
#25
pcbbc
Super Member
  • Total Posts : 1188
  • Reward points : 0
  • Joined: 2014/03/27 07:04:41
  • Location: 0
  • Status: offline
Re: USART PIC16F877A 2019/07/20 23:39:25 (permalink)
+1 (1)
If the host OS won’t receive the serial data correctly, it’s unlikely a virtual guest OS will fair any better.
As other posters have said - check your start/stop/parity bit settings are the same both ends.
I don’t know how to do this in LINX either - sorry.

As the logic analyzer is correct it would seem the problem lies with the serial interface module or beyond.
Is the serial interface module connected to a real physical serial port on the computer, or do you also have a USB serial port adapter?
#26
Page: < 12 Showing page 2 of 2
Jump to:
© 2019 APG vNext Commercial Version 4.5