-
1 Attachment(s)
PIC16F1454 Connecting To USB Doesn't Work
Hi,
Has anybody tried to make a USB project with a PIC16F chip? I'm trying to make the PIC16F1454 work with USB, but I'm getting this error from PBP3 "USBIN/USBOUT/USBINIT/USBSERVICE commands not supported for this device." This chip has USB capabilities. This error makes me think that PBP3 doesn't support USB in PIC16F chips. Any advice or comments are greatly appreciated.
The error in red comes from me trying to include the usbjadem.bas descriptor.
I'm just trying to initialize the USB with usbinit and it is not working. My basic preliminary code below.
Attachment 9849
Code:
#CONFIG
__config _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _PWRTE_OFF & _MCLRE_OFF & _CP_ON & _BOREN_OFF & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF
__config _CONFIG2, _WRT_OFF & _CPUDIV_NOCLKDIV & _PLLEN_ENABLED & _STVREN_OFF & _LPBOR_OFF & _LVP_OFF
#ENDCONFIG
TRISA = %00000000
ANSELA = %00000000
TRISC = %00000000
ANSELC = %00000000
usbinit
-
1 Attachment(s)
Re: PIC16F1454 Connecting To USB Doesn't Work
https://www.microchip.com/maps/microcontroller.aspx
I entered:
Part family = PIC16F145x
USB interface = YES
Search results = No products meet selection bla bla bla
WTH...?
I was also planning on using this PIC for my project.
Attachment 9850
-
2 Attachment(s)
Re: PIC16F1454 Connecting To USB Doesn't Work
Ah crap.
If I search USB in PIC18F4550.PBPINC, I get this:
Attachment 9851
If I do the same search in PIC16F1454.PBPINC:
Attachment 9852
That messes up my plans as well for an inexpensive USB PIC. :mad:
-
1 Attachment(s)
Re: PIC16F1454 Connecting To USB Doesn't Work
Holy crap, prices rise quickly.
DigiKey:
Attachment 9853
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Demon, don't give up. This is a very inexpensive chip for a USB project. I was hoping to use it for a few projects I have. I don't think that they implemented the USB part for this chip in the PBP software. Maybe Melabs can help with this. What do you think?
-
1 Attachment(s)
Re: PIC16F1454 Connecting To USB Doesn't Work
Also, PBP doesn't let you enable the PIC16F1454 USB internal voltage regulator. Below is the setting for the 18F4550.
Attachment 9854
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Quote:
Originally Posted by
rsocor01
Demon, don't give up. ...
Never give up, never surrender!
Quote:
Originally Posted by
rsocor01
... I don't think that they implemented the USB part for this chip in the PBP software. Maybe Melabs can help with this. ...
Yeah, that much is obvious with that statement in the INCLUDE.
I don't have any "direct contact" at MeLabs, and all comments I've read say PBP is dead.
I can always ask, but I have a feeling this PIC or PBP is of little importance to them.
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Great, the only post I found over at MeLabs has a reply from Darrel explaining the 16F145x are mutant PICs. :biggrin:
https://support.melabs.com/forum/dev...ammer#post2077
I'll ask and see what happens.
EDIT:
Done:
https://support.melabs.com/forum/pic...16f145x-series
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Quote:
Originally Posted by
Demon
Great, the only post I found over at MeLabs has a reply from Darrel explaining the 16F145x are mutant PICs. [/url]
Darrel had a special talent to understand things when they were difficult and not obvious. I learned a lot from his posts.
Quote:
Originally Posted by
Demon
I'll ask and see what happens.
[/url]
I will send Melabs an email. They always respond to my technical questions. I'll keep you posted.
-
3 Attachment(s)
Re: PIC16F1454 Connecting To USB Doesn't Work
Hmm, I'm trying to make this chip work with just an LED and the chip is not cooperating. I'm getting a "Does not match target device" error. When I try to get the target information, I get a different target id than the one in the INC file. If I change the INC file id to 3FFF, it doesn't work either.
I'm using the programming pins 9 and 10 to program the chip. The other 2 pins, 12 and 13, are for low voltage programming. They don't work either if I try them.
Attachment 9855
Attachment 9856
Attachment 9857
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Is there anything of value over there:
https://support.melabs.com/forum/dev...ammer#post2077
Are you using the ZIF adapter?
(post #2)
-
Re: PIC16F1454 Connecting To USB Doesn't Work
And check out post 4 about the epic programmer files.
(I see you have EPC in you image.)
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Hmm, I made it work for a flashing LED. This is weird, you need to power the 16F1454 chip with 5V. It won't get programmed if I power it with 3V. I have never seen this for a regular 16F chip.
Yes, that post from the forum was very helpful. He had some issues programming the chip too.
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Like I said, mutant PICs.
😁
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Why Microchip do such stupid things, like two sets of programming pins for low or high voltage?
Oh dear...
Ioannis
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Quote:
Originally Posted by
Ioannis
Why Microchip do such stupid things, like two sets of programming pins for low or high voltage?
Oh dear...
Ioannis
It doesn't make any sense to me either.
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Bad news, I got this response from Melabs.
Code:
We tried many years ago, but failed to make the USB commands work in a useful way. In any case there is no further development planned for PBP.
The 18F25K50 is less expensive than the 18F4550, but not as cheap as the 16F1454.
I wonder if they are going to stop selling and supporting PBP after they said "there is no further development planned for PBP". We use their U2 programmers and software a lot. I responded to their email asking if they will keep supporting PBP.
-
1 Attachment(s)
Re: PIC16F1454 Connecting To USB Doesn't Work
The good news is that the 18F25K50 isn't that expensive. I'll order some and I'll give it a try.
Attachment 9859
-
1 Attachment(s)
Re: PIC16F1454 Connecting To USB Doesn't Work
I just hit a sweet deal. At that price, I cleaned out everything they had on hand:
Attachment 9860
These go for $3.91 / 100 at Digikey.
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Quote:
Originally Posted by
Demon
I just hit a sweet deal. At that price, I cleaned out everything they had on hand:
Attachment 9860
These go for
$3.91 / 100 at
Digikey.
Those chips are the cheapest 18F with USB according to the Microchip Advanced Selector Chip tool. I'll order some and give it a try.
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Quote:
Originally Posted by
rsocor01
I wonder if they are going to stop selling and supporting PBP after they said "there is no further development planned for PBP". We use their U2 programmers and software a lot. I responded to their email asking if they will keep supporting PBP.
This is not new. For few years now the development of PBP has stopped. Only one man (Charles) supports any bugs found but no further work will be done. I guess he is or will be retired, so no interest by anyone to continue this great compiler.
It is pity that younger software engineers are not interested to take this compiler to the next level, but that is the case.
Ioannis
-
1 Attachment(s)
Re: PIC16F1454 Connecting To USB Doesn't Work
I don't care much for the 18F1xK50, either of them. They don't have much ram/flash resources, plus...
Quote:
Why Microchip do such stupid things, like two sets of programming pins for low or high voltage?
That was done for pin-out compatibility with the 18F1xK50, but these things are a royal PITA when it comes to programming them.
The ICSPCLK and ICSPDAT lines are shared with the USB D+/D- pins and that causes all sorts of issues:
- you have to make sure to unplug the USB cable when programming
- you can't program at 5V VDD since the USB D+/D- pins have a max voltage of 3.3V, and the programmers usually use VDD to power the programming pins
The programming spec shows the addtl circuitry required (they used to have a special adapter for this)
The second set of programming pins was added to the 16F part to help overcome this.
The 18F2xK50 is much easier to deal with.
See the PIC16(L)F145X Memory Programming Specification doc DS41620C (the 13/14K50 has similar restrictions)
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Thanks for that heads up TW. I would have slapped those "sweet deals" on a breadboard and bricked a few before catching on.
😆
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Quote:
Originally Posted by
rsocor01
Those chips are the cheapest 18F with USB according to the Microchip Advanced Selector Chip tool. I'll order some and give it a try.
Don't bother at Arrow / Verical. I cleaned them out.
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Quote:
Originally Posted by
tumbleweed
That was done for pin-out compatibility with the 18F1xK50, but these things are a royal PITA when it comes to programming
Yes, I agree with you. I had a hard time programming it just to flash an LED. Thank you for the explanation.
-
Re: PIC16F1454 Connecting To USB Doesn't Work
Quote:
Originally Posted by
Demon
Don't bother at Arrow / Verical. I cleaned them out.
I bought a few from Mouser. I'm hoping I can make the USB part work without any issues. I'll open a new thread if I have problems.
-
1 Attachment(s)
Re: PIC16F1454 Connecting To USB Doesn't Work
Quote:
Originally Posted by
rsocor01
I bought a few from Mouser. I'm hoping I can make the USB part work without any issues. I'll open a new thread if I have problems.
If not you, then most likely me. :D
Good for using Mouser, cause those on special at JLCPCB, it's the same units I bought. They just haven't updated their global stock yet.
Attachment 9862
-
1 Attachment(s)
Re: PIC16F1454 Connecting To USB Doesn't Work
The 18F13K50 won't compile with the DT interrupt file ReEnterPBP-18.bas. This variable HP_Vars is in the DT ReEnter interrupt file. If you want to use this interrupt, you need to go with the 18F14K50. The 18F14K50 compiled fine, but I haven't test it because I don't have one now. I need to order it. All the USB commands compiled fine.
Attachment 9872