Menu

Elusive Error no Clue what it is??

Help
xtal10
2016-07-19
2016-07-31
<< < 1 2 3 > >> (Page 2 of 3)
  • kent_twt4

    kent_twt4 - 2016-07-20

    Multiple definitions of RXPPS. Do not use RXPPS for I2C SCL and SDA. The data sheet is confusing on the requirements for bi-directional pins. I2C tested with PPS, and Input registers do not need to be set.

     
  • xtal10

    xtal10 - 2016-07-20

    Serial output is working if I remove the PORTA.4 stuff
    As for Serial input I have no clue.......

    I've been trying to toggle RA4 and having no luck, also MCLR RA3 no longer resets the chip.
    Its like pwr reset is not setting defaults , Yesterday reset was working....
    I was thinking MCLR_ON in config controlled...

     
  • xtal10

    xtal10 - 2016-07-20

    12.3 imply's input must be tied to output And it worked about 2 hrs yesterday right after I did that,
    Then I must have changed something that started the tail spin.
    By the way.. thx for the code, will keep for ref.....
    Right not I'm hung up on toggling porta.4
    I just love using a new pic and figuring out the gottcha's , and unfamiliar compiler

     
  • xtal10

    xtal10 - 2016-07-20

    Section 12.3 implys input mut be tied to output, And this worked about 2 hours yesterday,
    I must of changed something...
    MCLR no longer works, I cant toggle RA4
    Serial Output works until RA4 code was added
    NO clue if Serial input works

    Thx for your code... will look at it

     
  • kent_twt4

    kent_twt4 - 2016-07-20

    Digital outputs should not be defined in PPS, they should be default condition. The PortA.4 toggling is being used as a switch input and port output at the same time. Use another port pin for the input or output.

     
  • xtal10

    xtal10 - 2016-07-20

    Wher do you see RA4 being used for input ?
    I was trying to tell device to use LATA , as for defaults I think the are changing randomly
    MCLR no longer works

     
  • Anobium

    Anobium - 2016-07-20

    @Guys. May I ask that we move this conversation to Google chat or analternative or email

    I am having to search through the RSS feeed's for other forum postings.

     
  • kent_twt4

    kent_twt4 - 2016-07-20

    Beg your pardon I see the logic now. Modified code for 16f1704 PPS and works just fine. So suggest this is a hookup or hardware problem. Out.
    Kent

     
  • xtal10

    xtal10 - 2016-07-20

    Have to stop for the day-- wife has planes.... thx

     
  • xtal10

    xtal10 - 2016-07-21

    I modified a device file on Proton basic and was able to get a good compile after remarking out error s

    It would not run with defaults, so I added the following just before Main
    ....
    PPSLOCK = 0x55
    PPSLOCK = 0xAA
    PPSLOCK.0 = 0 'unlock PPS

    RXPPS=0x15                  'Pin RC5 source is an input for RX
    RC4PPS=0x14                 'Pin RC4 source is TX/CK
    
    SSP1CLKPPS = 0x10              'RC0 input SCL I2c
    RC0PPS=0x18                        '  identify clk
    SSP1DATPPS = 0x11                   'RC1 input SDA I2c   
    RC1PPS=0x19                         ' identify data
    
    PPSLOCK = 0x55
    PPSLOCK = 0xAA
    PPSLOCK.0 =1                          ''ED = 0x01  'lock PPS
    

    The I2c is working and serial output is working, have not tested Serial input....
    I can toggle RA4 with no issues
    [ tried demo pgm on GCB just to toggle Rcx and added RA4, could not get to work]
    I now have to figure out the counters and interrupt stuff ...

    So it looks like the pps stuff is good.....
    will do more checking the get back to GCB

     
  • William Roth

    William Roth - 2016-07-21

    @Xtal10

    Your posted code barely resembles what GCB code should look like. Honestly it is a complete mess and I am somewhat surprised it works at all.

    When changing to a new compiler, it is probabably a good idea to take the time to learn the cababilities of the new compiler, and how to take advantage of its capabilities before attempting to stuff code from another compiler into it.

    I imagine that about half of your code is unnecessary and most of the other half ignores the capabilites of GCB.

    My suggestion is to take the time to study the help file, learn the syntax, learn how to use the included libraries and GCB interupt handling, and then build you code from scratch, once section at a time. IMO, stuffing code from Proton into GCB is a waste of GCB capabilites,.

    The demos are included as a learning tool as are the examples included in the help.

    Good Luck

     
  • xtal10

    xtal10 - 2016-07-21

    Of course the 1st posted code was a mess , I chopped and sliced to get a clean compile.
    I did'nt want to reinvent the wheel, and needed support for 16F18326, and GCB offers it,
    unfortunately I encounterd problems, Unfortunately Microchip poorly documented the PPS section.
    You most read between the lines and examine the mini/micro notes carefully,then guess as to
    whats needed...As for using the default settings, they are poorly documented, I still don't know what the default Tx setting is.
    With GCB I encounter the following problems, I might be doing something wrong, like not setting some subtle value somewhere, I just don't know.

    I tried the Hardware Serial Demo,, Output worked after setting PPS, the program doesn't check input, so input may be an issue?

    I tried a flash the led demo.... It did NOT work.. [ may be 16F18326 related ] probably some Reg not
    being setup..

    I tried HI2C discovery code , after several trys, and finally changing PPS[incorrect values I think?], It did work for about 2 hrs then stopped, was it a fluke? Probably, or did I make a subtle change? ,I don't know, I never could get it to work again, The Clock and data lines are not being toggled per oscope..

    I did have an instance that setting TRISC to what SB the correct values. GCB issued In/Out warning while compiling, but pgm would not run., had to add DIR cmd...It's like GCB ignores
    direct TRISC changes?

    Another instance of running pgm tried adding TRISC , program compiled fine but would not run
    Disabling TRISC setting program ran - still courious about that...

    Why set TRISA or TRISC it save code lines and code space
    Literal -> W -> REG vs. Set/Clear bit, Set/Clear bit, Set/Clear bit, Set/Clear bit, etc..

    The Probs may all be related to the PPS settings, I've been unable to Google 16F18326 related
    issues.

    Will keep trying GCB on this Chip to see If I can figure out what I'm doing wrong, or whats going on..

     

    Last edit: xtal10 2016-07-21
  • Anobium

    Anobium - 2016-07-21

    Xtal10. Please read this.

    I will get a chip tomorrow. I will validate GCB is good and where it is not (which I would be very surprised) we can correct.

    Look through the demos. You need to look at the temperature demos and the look at the digital ADC (do a search on MCPxxxxxx).

    If I were you. Take a copy of the Xpress demos. Start at number 1 and work your way thru from flashing an LED this will teach you Great Cow BASIC and the host of great simple features.

    I reviewed you code yesterday when I was assisting you. I think that your code can be written in Great Cow BASIC in a structured manner (no goto's or use of labels), using the standard Great Cow BASIC libraries and no assembler.

    You are joining the most supported forum I have ever been part of - please try to understand our advice.

    I will await the chip from Microchip. Out.

     
  • Anobium

    Anobium - 2016-07-21

    @All. Microchip has just informed me that there more than a few errors in the errors in the datasheet, and, the MMC does not support this chip (I reported this to them) and, the Microchip support files are also incorrect/missing.

    There will be a new release of the Microchip MPLAB patch kit 31st July to address these issues. We will check our support files when this patch is released.

     
  • xtal10

    xtal10 - 2016-07-21

    Thx for the info Anobium....

    This is the 2nd time you mentioned Xpress demos ? All I can find is GreatCowBasic\Demos
    Are thes Xpress Demos somthing different, if so where are they????......

    As for the goto's and Lables, I grew up with them , I love them, also functions/subs/macros..
    I suspect that people that grew up with structed programming love it. Personally I dislike the structured stuff. I find it hard to follow, so as long as I have a choice I stick with goto's, labels, subroutines, and Functions and Macros [ which are non existant / lacking in Proton Basic]

    I prefer Basic, but unfortunately basic has very liberal / NO STANDARD, each vendor has their own flavor and restrictions..
    I dislike C++, but use it on Arduino / ESP8266, I have problems with { } crap and othe cryptic magic...

    The original code is to capture POOL Temperature, PH, PPM + more. Then passinfo to ESP8266, then to Internet or Intranet..

    I will revisit the flash LED , Its normally a no brainer.

    FYI using DS18B20, MCP3221, Internal ADC, and RA5 counter input[alternate ppm]

     

    Last edit: xtal10 2016-07-21
  • Chris Roper

    Chris Roper - 2016-07-21

    "This is the 2nd time you mentioned Xpress demos ? All I can find is GreatCowBasic\Demos
    Are thes Xpress Demos somthing different, if so where are they????......"

    Look on the Toolbar and click on "view demos" it is a shortcut to the path you already found.
    scroll down the folder list to "Vendor Boards" and double click.
    look for the folder "Xpress Evaluation Board" and double click.

    Work your way through from 01 to 25 and have fun :)

    you said:
    "As for the goto's and Labels, I grew up with them , I love them, also functions/subs/macros.."

    Line Numbers, and gotos were rendered obsolete in the 80's, I know I learned BASIC on an HP-TTY system in the 70's and I have not used a goto since the zx spectrum.

    If you use C++ on the Arduino then you already know the various flow control constructs that make goto obsolete. If you would like the other users in the GCBasic community to be able to help you you really should use a structure that we can all read. Many people here are not old enough to know what a GOTO statement is :)

    As you can tell from Anobium’s posts we are taking your problem seriously and so is Microchip, please bare with us but also please try to use the language itself and use a structured approach to help us help you.

    Cheers
    Chris

     
  • xtal10

    xtal10 - 2016-07-22

    Xpress #1

    1 Won't work changed to #chip 16f18326,32 dir porta out porta=0 porta.4=1

       a> porta pins appear to be in input state- no pullups[floating]
       b> added ANSELA=0 , still  porta pins appear to be in input state- no pullups
       c> added LVP_OFF to config,  , still  porta pins appear to be in input state- no pullups
      From previous Scan [when serial working] of PPS values  THE RA0-5 PPS =0 [LATA]  
     { I trird striping the setup code from the PB pgm that is half working PortA.4        toggles }
      I see the same results, porta pins appear to be in input state- no pullups [floating]
      I am now totally bewildered.......back to the data sheet
    
     

    Last edit: xtal10 2016-07-22
    • Anobium

      Anobium - 2016-07-22

      Please wait till I get my chips here. They did arrive in the mail this morning - which is when I typically get them. Maybe tomorrow.

      I will confirm operation.

      As Chris pointed out - I have open tickets on this chip with Microchip.

      Please wait until I have it tested on a test bed here.

       
  • xtal10

    xtal10 - 2016-07-22

    Does Microchip have ERRATA on this chip listed anywhere?
    I havn't found any....

     
  • William Roth

    William Roth - 2016-07-22
    Does Microchip have ERRATA on this chip listed anywhere?
    I havn't found any....
    

    For Microchip products, the latest published Errata for any given product should be listed in the Documentation Section of the Product Sheet. If is is not there, then whatever errata that is known by Microphip is not generally available.

    http://ww1.microchip.com/downloads/en/DeviceDoc/80000668C.pdf

     
  • xtal10

    xtal10 - 2016-07-22

    Where do I see this msg?

    It might be easier to send Email ccxxcx@charter.net , This account gets 100+ spams a day,

    osmosis isn't working ,,,, How do I see the PM??

     

    Last edit: Anobium 2016-07-22
  • Anobium

    Anobium - 2016-07-23

    @XTAL10. I have removed you specfic email address for obvious reasons. Not a good idea to publish your specific email address on an open forum. These forums are 'publish and subscribe' and therefore the serach engines will pick up email addresses. If you do not know what 'publish and subscribe' please do a Google search.

    The message? You will reveive a URL to these personal message in your inbox of the email system that you used during the SourceForge registration process. As this was only four days ago... I think you may remember which email address that was. If you chose an email address that gets lots of spam then change.

    I have sent you a message to this email address you provided.

    Osmosis. Read the Help! See here When you created your sourceforge account the registration process created this for you.

     
  • xtal10

    xtal10 - 2016-07-23

    Anobium
    If I interpet this correctly The PM's would be sent to the email accout I listed when I registered..
    I have found no emails from sourceforge or with 18326 subject line... please resend.....

     
    • Anobium

      Anobium - 2016-07-23

      Send new message I sent myself a cc copy - I have received my own message, so, it works.

       
<< < 1 2 3 > >> (Page 2 of 3)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.