1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Wow my hello world 16f18446 got 21 downloads

Discussion in 'Microcontrollers' started by be80be, Jun 30, 2018.

  1. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    Not so that doesn't work you have to set the com port up in options first then open the port if you try to change it after the com port opens it hang's the port or messes up loading hex's

    Then you have a problem with Linux the stty program that is used does not have a DTR command it's done with a work around to let you set dtr stty has none.
     
  2. Evan VENN

    Evan VENN Member

    Joined:
    Dec 30, 2017
    Messages:
    30
    Likes:
    0
    Wot? I am sorry but I cannot understand. I see words but do not understand. Sorry.
     
  3. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    Simple lol
    You have to set the options first
    cool.png

    Linux doesn't use DTR on com ports if you read the man page DTR is not really for what microchip is doing here in linux you have only a CTS command
    To use the dtr you have to write a warper that set's dtr coolterm has the option to do so
     
  4. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10
  5. Evan VENN

    Evan VENN Member

    Joined:
    Dec 30, 2017
    Messages:
    30
    Likes:
    0
    Dont agree.

    Setting DTR will cause the new board into debug mode. Setting DTR will then change the operating status of the Microchip part in terms of the communication lines between the ATMEL part and the Microchip part.
    Without DTR set the terminal should operate as normal.
    I have just got off calls with Microchip and these are the correct assumptions.
     
  6. Evan VENN

    Evan VENN Member

    Joined:
    Dec 30, 2017
    Messages:
    30
    Likes:
    0
    With respect to programming. Some insights.

    The recommended CONFIG setting is LVP = 1 and MCLRE = 1 in the PIC16F18446 on this new board. Note therefore the constrained use of Re3.

    I have now, with the latest firmware, programmed the hex through the mass storage drive and verified that the application flash is written correctly.
    The board operates as expected when the application is programmed.

    I have also completed the following test:
    WRITE: 0A000E00 8F3F FE3F 9F3F FF3F FF3F 83
    READ: 0A000E00 8F3F FE3F 9F3F FF1F FF3F A3

    The hex writes the LVP bit to 0, as the nEDBG does not support high voltage programming and programming process flips the LVP to 1 before programming.​

    All this information is missing in the Xpress user guide. This has been logged as bugs and Microchip will update the documentation.
     
  7. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    Whatever you think setting the DTR wrong cause lot's of problems but The serial didn't work till I used coolterm and set it as shown

    This tells you you have to set dtr to use the com port of the nEDBG
    Screenshot from 2018-07-11 07-54-18.png
     
  8. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10
  9. Evan VENN

    Evan VENN Member

    Joined:
    Dec 30, 2017
    Messages:
    30
    Likes:
    0
    I will share more. When you reset the new board, with the original firmware, the ATMEL firmware sets the VPC port correctly for and two bytes are transmitted to a terminal without DTR high, then VPC communications stops. When you reset the new board, with the latest firmware, the ATMEL firmware sets the VPC port correctly for 32 bytes to a terminal without DTR high, then VPC communications stops.

    So, something is not correct.
     
  10. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    Here what I don't get from what your saying the only data sheet they printed is wrong.
    But this is my finding the stuff in it works as said I use Linux mostly from what I found out they cutout control of the DTR years ago so my ubuntu didn't have a way to set DTR.
    But programming and debugging worked fine only the com port that didn't.
    Next I gave a try on windows 10 using realterm didn't work there too found coolterm and set the options to match the datasheet and it all works now
    debugging progamming and the comport

    So what broke there.
    It's like it said my problem was I had no program for serial in linux that let's you set the dtr and the one for windows 10 that did wasn't doing so from what i reading most any that's usb to serial don't cause DTR is really not used much for that it was used back when we had serial printers not a comport talking to a uc LOL
     
  11. Evan VENN

    Evan VENN Member

    Joined:
    Dec 30, 2017
    Messages:
    30
    Likes:
    0
    Something is not correct. We have bytes, valid data being transmitted. Microchip have accepted that today. They will fix the firmware.

    Remind me. Do you have the same board? I posted a photo.
     
  12. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    Mine look just like what you posted
    20180709_172056.resized.jpg
     
  13. Evan VENN

    Evan VENN Member

    Joined:
    Dec 30, 2017
    Messages:
    30
    Likes:
    0
    Then, wait for the firmware. The current firmware is not safe for production.

    I would not be making this up. There are serious issues in the firmware.

    I got this today from Product Development. I video'd the serial errors.

    At 02:16 you showed that you are able to receive a many bytes at power-up / early initialization of the board.
    This is unfortunate and may be related to the initialization state in the nEDBG firmware, a bug has been logged to investigate the boot state and fix the issue.​
     
  14. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    The whole thing not safe you wouldn't use that in production you would buy a 16f18446 and make a PCB install a programmed chip LOL
     
  15. Evan VENN

    Evan VENN Member

    Joined:
    Dec 30, 2017
    Messages:
    30
    Likes:
    0
    Did you mean.

    The whole thing not safe. You wouldn't use that in production. You would buy a 16f18446, make a PCB and the install the ATMEL programmed chip.

    You agree. Good.
     
  16. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    No Id forget the SAMD21 and use a just the 16f18446 and program it with a pickit 3 or 4
     
  17. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,727
    Likes:
    712
    Location:
    Derbyshire, UK
    Of course you would, the board under discussion is a simple development board - for any serious project you'd then move to the plain chip - in fact I got plain chips while I was waiting for the board to come :D
     
    • Like Like x 1
  18. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    I like the 16f18446 moved on to adc the 12 bit looks fun.

    I have 3 of the boards 16f18877 16f18855 and this one 16f18446

    I order 3 tubes of chips the 28 pin and 40 pin of 16f18855 the 16f18875I like these newer chips
     
    Last edited: Jul 11, 2018
  19. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,727
    Likes:
    712
    Location:
    Derbyshire, UK
    Yes so do I, great facilities on them.

    I was planning my next project with one, but reverted to the 18F26K22 for the extra memory and twin serial ports.
     
    • Like Like x 1
  20. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    I was playing with the adc it's 12 bit why an i getting 1715 when the pot is at 3.3 volts should it not be 4096
     

    Attached Files:

  21. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    Oh forget the above post lol it was a bad pot LOL i burnt some of them up setting a 317 with them the LM317 had pinout wrong
    I just changed the pot
    this looks way better
    Screenshot from 2018-07-12 00-28-28.png
    That's sent out using a 32 bit buffer using hardware Interrupts
    Think if I keep playing with xc8 i'll be doing something useful soon LOL
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice