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
    I meant imported 21 times sorry
    Microchip was giving away what's called the Curiosity Nano It's a 16f18446 that looks like a nano
    It has some great stuff you use and programming is simple you just place the hex on what shows up as flash drive and it loads and runs
    your code.
    The hello world is just a simple led toggle using onboard led to see if you have it working I started with uart but needed to test to see if the osc was working
    so I posted this.

    http://mplabxpress.microchip.com/mplabcloud/example/details/701

    [​IMG]
     
  2. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,759
    Likes:
    428
    Location:
    Brisbane Australia
    Congrats. Do you have a link to that board? I can't find it on Microchip's website - I can never find anything on their site.

    Mike.
     
  3. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,727
    Likes:
    712
    Location:
    Derbyshire, UK
    Well mine finally arrived yesterday, I can't believe how long it took to come :D
     
  4. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  5. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    Last edited: Jun 30, 2018
  6. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    I know right I forgot about it then when i picked up the box i was like how did i get this LOL.
     
  7. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,703
    Likes:
    128
    Location:
    Michigan, USA
    Mine arrived last week and I just hooked it up for the first time last night. Thank you for the tip, Burt.
     
  8. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  9. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,703
    Likes:
    128
    Location:
    Michigan, USA
    Oh my goodness... I just realized the "blinky" example I used to test my board last night was your program. Way to go, Burt!
     
  10. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,727
    Likes:
    712
    Location:
    Derbyshire, UK
    OK, I thought I'd better join it :D My board is flashing now as well!.

    However - I just thought I'd like to query this line:

    __delay_ms(200); // 1 Second Delay

    A little typo perhaps?.

    I must admit, this range of new PIC's is rapidly becoming my favourite, decent amount of memory, great peripherals, and a wide range of pin selectable options.

    Having said that, my current project (for which I'm awaiting PCB's) is using the 18F26K22 - which has even more memory, but even more important (for this application) two serial ports.

    Just (this second) checked status on the boards, dispatched this morning, currently in a Chinese airport :D
     
  11. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    Lol I started with 1 second I changed it too 200 ms I forgot to change the delay commit

    But now to figure how to get the builtin usb serial to work It shows as a com port but
    as of now I can't use it I no my code works on the 16f1825 But the com port is showing up as a sys only com port on Linux
     
    Last edited: Jun 30, 2018
  12. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,727
    Likes:
    712
    Location:
    Derbyshire, UK
    To use the USB socket as serial you need to allocation the UART to the pins that the USB connects to, on a 16F18877 it's RC0 and RC1 - there's a demo program in the Express examples on the website.

    Works fine in Windows.
     
  13. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,703
    Likes:
    128
    Location:
    Michigan, USA
    Way to go, Nigel. Can you whip up a version for the 16F18446 for us, please? grin...
     
  14. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    It shows RB4 and RB6 on the data sheet sch for the board
     
  15. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,703
    Likes:
    128
    Location:
    Michigan, USA
    It looks like we need to use PPS (Peripheral Pin Select) to get our signals on those pins. Here are the associated PPS register settings. I wonder if those require a PPS "unlock" sequence?

    RX1DTPPS = 0b00001110; // RB6 = RX input
    RB4PPS = 0b00001111; // RB4 = TX output

    Use Code Configurator to add the USART module and use Pin Manager to select the pins?
     
    Last edited: Jun 30, 2018
  16. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    The problem I had is I can't use the com port on linux I think I got that figured going to try it out now
     
  17. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    got learn how to use printf
     
  18. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    Well serial works I just can't get the onboard serial to work.
    I set the pins for Virtual COM Port interface over UART.
    I think it's something to do with this.
    The DTR Line there is no place to set it in putty
     
    Last edited: Jul 2, 2018
  19. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    Guess there something wrong with the CDC I can use a usb to serial to see it's sending on the right pins but a can't get CDC to work as a com port
    I Know the code works
    Screenshot from 2018-07-03 13-05-11.png
     
  20. stan

    stan New Member

    Joined:
    May 29, 2014
    Messages:
    2
    Likes:
    0
    I got a 16f18466 dev board free from microchip as above.
    Plugging into win 7 or 10 there are drivers that don't install.
    Has anyone had this problem?
     
  21. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,727
    Likes:
    712
    Location:
    Derbyshire, UK
    No, I've used mine here on Win10 and at work on WIN7.
     
  22. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,275
    Likes:
    159
    Location:
    morristown,tn
    Only problem I'm having is the CDC it shows up and i'm sending data out the pins it said to use I tested it with a serial usb adapter.
    But I guess like I posted above my software is not setting DTR cause it doesn't send data over the builtin serial at all.

    But both linux and windows 10 shows it as a com port and a fash drive.
     

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