Question about Hbusin / Hbusout on PIC16F15313


+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Junior Member esotec's Avatar
    Join Date
    Sep 2019
    Posts
    3
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    0

    0 Not allowed!

    Smile Question about Hbusin / Hbusout on PIC16F15313

    Hello there,

    Attempting to use HBusIn or HBusOut with PIC16F15313 and Proton 3.7.2.5 gives me:

    "Device not suitable Hbusin or Hbusout because no SSPCON2 register available!"

    I have not used HbusIn or HBusOut for several years and not with any newer devices. however from the user manual I gather these commands are meant to work on any supported device with a hardware MSSP?

    16F15313 has a hardware SPI/i2c MSSP which has SSP1CON2 not SSPCON2. Is there an error in the support files for the device or am I at fault?


    Thanks In Advance

Attention

This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

The advertisements we display are relevant to this web site and your browsing history

Please consider supporting us by disabling your ad blocker.


Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

If you can, please report issues in the forum area WebSite / Forum Issues


Thank you for your attention.

  • #2
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,428
    Thumbs Up
    Received: 296
    Given: 142
    Total Downloaded
    1.75 GB

    0 Not allowed!

    Default Re: Question about Hbusin / Hbusout on PIC16F15313

    Microchip are notorious for changing the way peripherals work and teh SFRs used, so the compiler's hardware I2C routines only work with a specific pattern to the peripherals.

    When I originally wrote the HBus commands, all the devices followed the same protocols and used teh same SFRs and bits within them, but over time, Microchip have moved the goalposts so many times, it is impossible to keep up with them. I just wish I had never created the Hbus commands. :-(

    I don't have one of those devices, so you can do some tests to see if it is just the name of the SFRs that have changed.

    Make a copy of the p16F15313.ppi file so the original is safe.

    Use notepad to open the p16F15313.inc file and change the SSP1xxx SFR names to just SSPxxx SFRs. Then try the compiler's Hbus commands. If they work, I'll make the changes for other devies that have that name change, but if they have changed the protocol for the MSSP peripheral, it will have to wait until I get a device and examine the datasheet etc... And get some time to do it, because there is only me working on the compiler for zero money. :-(

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #3
    Junior Member esotec's Avatar
    Join Date
    Sep 2019
    Posts
    3
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    0

    0 Not allowed!

    Default Re: Question about Hbusin / Hbusout on PIC16F15313

    Hi top204,

    Thanks for the heads up,

    I'll have a look into the situation in the next few days and post an update then


    Thanks again...

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #4
    Senior Member Stephen Moss's Avatar
    Join Date
    Jan 2006
    Posts
    511
    Thumbs Up
    Received: 31
    Given: 7
    Total Downloaded
    3.72 GB

    0 Not allowed!

    Default Re: Question about Hbusin / Hbusout on PIC16F15313

    Quote Originally Posted by top204 View Post
    Microchip are notorious for changing the way peripherals work and teh SFRs used, so the compiler's hardware I2C routines only work with a specific pattern to the peripherals.

    When I originally wrote the HBus commands, all the devices followed the same protocols and used teh same SFRs and bits within them, but over time, Microchip have moved the goalposts so many times, it is impossible to keep up with them. I just wish I had never created the Hbus commands. :-(
    It is impossible to keep up with ever changing goal posts, especially if different devices operate differently as I would think having a whole bunch of different statements to cater for every option could make even the best written source code a large, unweildly and difficult to maintain.
    One of the great things about Proton, particularity for new PIC programmers, is the availability of easy to use commands to quickly get things doing, however the one downside (as it were) of that is some users will over relay on them, never taking the time to learn how to understand the datasheets and manipulate registers directly leaving them stuck when they encounter a device on which the command does not work.

    Perhaps in some cases where Microchip have made too many changes/have too many different methods for different devices the occasional downgrading of some difficult to maintain commands (or even device) to either "May not operate on all devices" or "Legacy - Not Suitable for new programs" is necessary.
    I am sure any reasonable Proton user would understand the need for this given the large number of differnt device you are trying to cater for and that you are only one person who can only dedicate so much time to maintaining the compiler.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #5
    Junior Member esotec's Avatar
    Join Date
    Sep 2019
    Posts
    3
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    0

    0 Not allowed!

    Post Re: Question about Hbusin / Hbusout on PIC16F15313

    In reply to Stephen Moss,

    I agree that Microchip perhaps make too many changes and I suspect that may be to break old versions of products so an upgrade is needed?

    As regards one person keeping the compiler updated..

    The support files for the particular PIC I chose to use are present and are obviously not correct - how about the person writing the support files reading the datasheet? otherwise don't include them at all.

    Protonbasic is used by people with different skill sets for different reasons and it is not necessarily the case that they don't read the datasheet or don't know what they are doing. Of course many users can create their own code to use the MSSP hardware but I chose to use Protonbasic because my client is not skilled either in C or assembly and if I provide the Picbasic source code to them for the PIC included in their project they are likely to have less trouble understanding it or changing it later. I chose Hbusout/Hbusin to minimize development time and code complexity, it was an experiment and not at all necessary for any technical reason. For the moment I have code that compiles using the bit banged alternatives (albeit untested yet).

    I appreciate the effort put in by a small number of people here and I realize that mostly they are overloaded and probably do not receive either reward or thanks for their time and effort. To all of you thanks and kudos for doing what you do to help and support Proton and it's users.

    I do not have a good understanding of the compiler itself, nor do I have the time or willingness to get a better understanding at this time, so for the moment will just consider the people who do alerted and request that they take a look at the situation if and when they have time.


    Esotech

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #6
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    2,239
    Thumbs Up
    Received: 75
    Given: 181
    Total Downloaded
    5.15 GB

    0 Not allowed!

    Default Re: Question about Hbusin / Hbusout on PIC16F15313

    The support files for the particular PIC I chose to use are present and are obviously not correct - how about the person writing the support files reading the datasheet? otherwise don't include them at all.
    Wow, pretty harsh mate!

    I understand that the process of creating config files is automated using mc's own files (which on release are often wrong).
    George.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #7
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,428
    Thumbs Up
    Received: 296
    Given: 142
    Total Downloaded
    1.75 GB

    0 Not allowed!

    Default Re: Question about Hbusin / Hbusout on PIC16F15313

    General updates and anomaly corrections to the compiler are free, and the compiler rightfully stated in an error message that that device was not supported with the Hbus commands for the reason it did not have a particular SFR.

    If you want personal updates done to the compiler then I will gladly accept a payment and spend a few days adding what is required, and hours reading datasheets and making sure Microchip have not screwed up their data on a device, or made some changes to a device that is not clearly stated in a datasheet.

    I get zero, "and I mean zero"! money for the compilers and I perform the updates and upgrades for my own good feeling towards the many, many professional and hobbyist users of the compilers. This has to change otherwise I cannot work on the compilers and I am currently creating the Proton compiler for other manufacturer devices, and looking at trying to get funding for a domain etc.... The Proton compilers have been left to rot over the years and not promoted, yet I know, and have spoken to quite a few professional users of them that are very succesful because the Proton compilers produce the tightests and fastest code of PICmicro compilers, and are one of the easiest to understand and use.

    Last year, I re-wrote a professional's code in Proton when he had ran out of space using the Pro version of the Mikro BASIC compiler, and the Proton code took less than half the flash memory space and a tiny fraction of the RAM space that the Mikro compiler produced. I even had to alter the code quite a lot because the Proton code was running a whole lot faster than the dreadful Mikro code, so the timeouts were firing too quickly because Proton's code was altering variables a lot quicker, and the interrupt firing was a heck of a lot faster in Proton so I actually had to write a non-blocking debounce piece of code for a hall sensor interrupt, and this was even with Proton saving the SFRs and variables used with Context Save/Restore! The re-write was required so extra functionality could be added to the code which was an "impossibility" with the Mikro code, even though the Proton code re-write did exactly the same tasks and no code tightening or differences were written to the initial code.
    Last edited by top204; 22nd November 2019 at 15:49.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #8
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    493
    Thumbs Up
    Received: 59
    Given: 0
    Total Downloaded
    408.14 MB

    0 Not allowed!

    Default Re: Question about Hbusin / Hbusout on PIC16F15313

    As regards one person keeping the compiler updated..
    You could always go straight to the horses mouth (Microchip), pay 10x what Proton costs, and find out that their compiler/libraries don't fully support the chip you're using.

    Good luck getting them to fix it, too.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

    Thread Information

    Users Browsing this Thread

    There are currently 1 users browsing this thread. (0 members and 1 guests)

       

    Similar Threads

    1. [SOLVED !] DWord Addressing for BusIn, BusOut, HbusIn, HBusOut?
      By zerone in forum Proton Plus Compiler v3
      Replies: 4
      Last Post: 14th March 2014, 21:32
    2. Hbusin/Hbusout error
      By chuckieboy in forum Proton Plus Compiler v3
      Replies: 13
      Last Post: 28th December 2013, 15:45
    3. 18F4525 HBUSIN HBUSOUT program hang
      By Jeffrey in forum Proton Plus Compiler v3
      Replies: 0
      Last Post: 15th July 2007, 17:40
    4. HBusIn/Out question
      By johngb in forum Proton Plus Compiler v3
      Replies: 2
      Last Post: 15th November 2004, 12:11
    5. HBUSIN/OUT Question
      By johngb in forum Proton Plus Compiler v3
      Replies: 2
      Last Post: 13th November 2004, 10:28

    Members who have read this thread : 35

    Actions :  (Set Date)

    You do not have permission to view the list of names.

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts