Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 951711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:46:48+00:00 2026-05-15T23:46:48+00:00

Here is my issue, it appears that all the communication lines for the PIC

  • 0

Here is my issue, it appears that all the communication lines for the PIC 16F913 reside on the same set of pins, this is convenient in that I don’t have to sacrifice GPIO pins just to do comms, however the problem I’m having now is if I’m using the SPI on the chip, how can I send information to the RS232?

The reason this issue came up, is that I just bought a CAN bus chip that communicates over SPI, and I would really like to see the data on RS232, so I can see messages. (I really don’t know much about CAN yet, so who knows if this even makes sense yet).

Here are the options I see, and maybe someone else has better ideas that I’m just simply missing.

  1. Somehow setup a time scheme that will switch between SPI and RS232 every time I get data,

— This doesn’t seem hard and should work, but supposing I don’t want to miss a message, what if a message is written while I’m writing to RS232, is it possible I’ll miss it?

2.. I can always use SPI, but then build my own comm bus over 8 of the GPIO lines, to another PIC 16F913, using only the GPIO lines and then since the RS232 lines are free on the second PIC I can simply read the data and spit it out.

— This one is doable but now we’re wasting 2 chips, AND all the GPIO lines,

There has to be a better way. Or is there?

Any help is greatly appreciated.

Update: I would like to clarify, obviously one solution is using a completely different chip (which may in fact be what I end up doing, if I can get the 18F programmed), however, I’m interested in worst case scenario, in which I am limited in resources and only have some 913’s, is the way described above the only way to do it with this chip, or is there a better way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:46:48+00:00Added an answer on May 15, 2026 at 11:46 pm

    You could do a software implementation of the SPI bus – it’s easier to do than the UART because the timing isn’t critical and you are in control of it.

    Most CAN chips have a few receive buffers so if you’re busy doing something with the UART then the messages will be buffered inside the CAN chip. But… you will need to make sure that you can get the messages out of the CAN chip fast/often enough so you don’t lose some.

    You would probably have to either use an interrupt for the UART Tx process – so that you can be receiving CAN messages while you’re sending data on the UART.

    If you’re only interested in certain messages most CAN chips have filters – this makes it easy to only receive the messages you’re interested in, usually dropping the number of packets/second dramatically.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a bit complicated but here goes. I have a Rails app that
I've had a look around to see if this has been answered, and there
I have an ASP.NET site that was working fine running on Windows Server 2003
I have a PHP/5.2 driven application that uses transactions under MySQL/5.1 so it can
I'm working on an HTML page that needs to be more or less pixel-perfect,
Ok, this has had me stumped for a while - One of our clients
Thought I would throw this one out there and see what other people's experiences
I have a situation where an element, of type radio, is contained in an
Update: I left the following javascript code in to show how the problem developed
I have a two-part program where the main core needs to have an adapter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.