Yes and no, it have been discussed before, it's down to your MPASM version. The latest version use FCMEN, while older use FCMEM
http://www.picbasic.co.uk/forum/show...t=3251&page=30 Post 149 and +
Yes, you are right, but it's usual to comment the default one. At least, i always do it. see bellow..3nd, you are redefining the PIC CONFIG register and this is also done in the so called INC file from Melabs for that PIC. This generates errors and the user has to choose where to configure these registers to avoid duplication of definition.
http://www.picbasic.co.uk/forum/showthread.php?t=543 Post 5 and +++
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Mister E,
the code work,
but AN0 and AN1 not stable
leds not stable off....same time is on or off....+- 5 seconds...push-buttons is off
than push-button = on, led stable ......on...off
i use 18F4550
470 nf in Vusb / Vss
.1 uf ceramic in Vcc/Vss
4k7 in MCLR / Vcc
resonator 4mhz
* pardom for my english
yes, but i make the mr.e code and circuit to test
....and ...not stable too...i think my 5v from pc is not good
pardon for the same question.
Last edited by mpardinho; - 10th April 2007 at 19:48.
I just ordered and received the wrong USB connector...AGAIN!!! (insert Mr_E's headbanging against desk picture here)...
Could ya take a look at www.digikey.com and match up a part number if you get a chance?
Out of curiosity... Anyone tried USBDemo with Windows Vista? Working?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
No, but I'll give it a go this weekend I can feel a backup coming on....
BTW,
I need a decent way to debounce a number of switch's connected to my pic.
I'm using a dirty PAUSE 50 to do just that, but finding unless I put USBSERVICE everywhere (ie after checking the status of each switch), the switch's arent being sent to the pc (via usb).
I borrowed the ASM timer interrupts from the usbdemo code, but that doesnt help either. I'm thinking that TMR interrupts aren't independent of PAUSE statements. Is this true?
I don't want to use the BUTTON command.
cheers
Squib
If you're using ON INTERRUPT... yes PAUSE will screw up things. Using Darrel's interrupt + it's USBDemo code modification ( AKA POST 148), should solve it.
http://www.picbasic.co.uk/forum/show...&postcount=148
Depending how you implemented the interrupt debounce/read plah plah, it may work as well with ON INTERRUPT..
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Ok Great I'll have to try it. Good to know there could be a work around.
BTW I tried running usbdemo on Vista, but I need the mchid.dll, which I have on floppy disk but can't get it on to the laptop running vista.
Don't supose you can upload it on to the website so I can download it straight onto my laptop eh?
Cheers
squib
That DLL came with Mecanique EasyHID. I'm not sure if David allow to link the DLL even if the software is 100% free.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
What would the __CONFIG lines look like using the ECIO mode with a 48MHz half size oscillator on pin 9?
i would guess...
Look table 2-3 in the data sheet. there's few other setting available. Not sure the divide by 12 is the best option when you can feed it directly.Code:asm __CONFIG _CONFIG1L, _PLLDIV_12_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L ; ; ; USB clock source comes from the 96 MHz PLL divided by 2 ; ; [OSC1/OSC2 Src: /1][96 MHz PLL Src: /2] ; Divide by 12 (48 MHz oscillator input) __CONFIG _CONFIG1H, _FOSC_ECPLLIO_EC_1H & _FCMEN_OFF_1H & _IESO_OFF_1H ; ; ; Oscillator Switchover mode disabled ; ; Fail-Safe Clock Monitor disabled ; External clock, PLL enabled, port function on RA6, EC used by USB ; ; other __Config ; endasm
Last edited by mister_e; - 14th May 2007 at 13:49.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
O.K. the original code was for a 4550. You need to rebuild the project in EasyHid for a 2550. There's a load of needed files.
I've uploaded the 2455 and 2550 stuff here. let me know what happen now. The 2550 have been tested... but i don't have any handy 2455.
I've also uploaded the schematic, if some need it.
NOTE: If your going to use LONG variables, you MUST copy the PIC18Xxxxx.BAL file in your source directory as well, unless you'll receive some compilation errors.
The .BAL file is located in \PBP\USB18 directory.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
OK i received those 2455 today, the files i sent work as suppose to.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I downloaded the 2550 zip, then the 4550 zip.
compiled the 2550 example, blew it, plugged it in, nothing, then remembered the crystal speed (I'm on a 16) so went into programmer software and changed div from none to 4, nothing.
changed all fuse setting in programmer software to what I usually have, worked first time!
Ran the VB demo, picked it up and worked a treat!
I was going to update one of my toys with the fake comport CDC but this, well, so much better!
Thanks a million for showing me it can be done without expensive development kit, this thread should be tagged as a sticky at the top of the forum!
(yes I had it working in about 20 minutes, this from me that usually has all kinds of problems!) (And I dont even have a proper dev board, just a homebrew with leds etc)
Welcome in the USB world
Glad to hear you like it.
Enjoy!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Like it I love it!
just about to start a little project with it now, or at least block one out, so I have a quick question.....
If I was to use hserin to receive a string of long slow bytes, say 160chars at 1200, would it cause a problem with the USB not being serviced while hserin recieved the bytes, especially if say the incoming data was short, say only 10 chars sent, hserin would have a timeout but if it sat there for 2 seconds, would it drop the USB?
yes or not, i would recommend to use the POST 148 version with Darrel Taylor instant interrupt instead of ON INTERRUPT.
See that link...
http://www.picbasic.co.uk/forum/show...&postcount=148
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Can i use this demo with DasyLab Or Labview ? I using both software from long time for DAQ.
Thanks
.
I am looking for this trough hole plcc socket, could anyone help which type , or digikey/mouser part number
Thanks
Thanks Darrel, but I need the PLCC socket only, not the whole adapter, what make/ type is it ?
It is smaller than normal PLCC44 socket
Johan
Steve
Yes, it is indeed just a plain PLCC socket,
I was mistaking it as something else , I thought it was a " mini" plcc44,that fits inside DIP 40 socket, but after I look more closer, it is bigger than the DIP
I never use PLCC44 socket before, will it fit to QFN 8x8 type PIC 18F4431 ?
Nope, it's really 2 different animal. Even if possible, good luck with home made soldering for QFN packages
the easiest home made soldering would be DIP or TQFP packages.
But yes you can buy some QFN adapter.. make sure you're wallet is ready for that talking about those no solder type... kind of ZIFF for QFN... see those
http://www.ironwoodelectronics.com/c...-P-Z-01Dwg.pdf
http://qfp-adapter.com/Site/QFN-MLF-...cket-TOPs.htm#
Last edited by mister_e; - 14th July 2007 at 16:15.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
hi,
getting these errors: PBP 2.47, Microcode Studio 3.0.0.0 and MPASM 7.31
ERROR: Macro USBINIT? not found in macro file.
ERROR: Macro USBSERVICE? not found in macro file.
ERROR: Macro USBIN?CBBL not found in macro file.
ERROR: Macro USBOUT?CBBL not found in macro file
Thank you,
Regards..
Last edited by naga; - 22nd August 2007 at 13:10.
Hi.
Momboz..
Iam getting exactly same errors dear,
ERROR: Macro USBINIT? not found in macro file.
ERROR: Macro USBSERVICE? not found in macro file.
ERROR: Macro USBIN?CBBL not found in macro file.
ERROR: Macro USBOUT?CBBL not found in macro file.
How did you solve this problem?
Plz Help me...
Regards...
Which PIC are you using?
You probably need a modified .bas file for that chip.
If you are using a 2455, 2550 or 4550 then Steve has already provided the files. (see post 99)
You may also need to modify the PBPUSB18.LIB file if your PBP installation is not in the default c:\PBP folder. As was the case with Momboz.
<br>
DT
Hi,
Thanks for your reply.
Errors for both 2550 and 4550;(using steve's files)
there are 2 folders in c:\PBP, one is MCSP-3.0 2ND one is PBP247,
Now different errors when iam trying to compile Steve's file from C:\PBP.
No errors from the sample folder files(pbp247)i tried with its own compiller and mpasm..
Regards,
plaese find attached image..
There may be several things going on here. Let's see if we can fix a couple of them.
First, since PBP wasn't installed in the default folder, you have to change the path to one of the files.
In your c:\mcsp\pbp247\ folder, there is a PBPUSB18.LIB file.
Open it with notepad, and change the first include line to...
include "c:\mcsp\pbp247\PBPPIC18.LIB"
----------
Next, edit the c:\mcsp\pbp247\18F2550.INC file with notepad.
Comment out ALL of the __CONFIG lines with a semicolan ;
----------
Then in the USBdemo program, change _FCMEN_OFF_1H to _FCMEM_OFF_1H
That will need to be changed again after the next time you upgrade MPASM.
----------
Those should fix several of the errors.
Compile it like that and let me know whats left.
<br>
DT
Oh, and 1 more.
In Microcode studio, goto
View | Compile and Program options | Compiler tab
And select the INHX8M radio button.
<br>
DT
Dear Darrel Taylor,
Thank you very much..compilled succesfully but few warnings..
commented like this :
ALL ; __CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
ALL ; __CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H
ALL ; __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
ALL ; __CONFIG _CONFIG3H, _PBADEN_OFF_3H
ALL ; __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
i selected only INHX8M radio button in View | Compile and Program options | Compiler tab
and disabled rest..
I'll let you know its behavior after programming the IC tonight ..
Thanks again..
Warm Regards...
Ha Ha Ha
That's funny.
Very close,
but no cigar.
should be...Code: ; __CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L ; __CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H ; __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H ; __CONFIG _CONFIG3H, _PBADEN_OFF_3H ; __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
DT
Bookmarks