Please excuse my stupidity, but I never used C for PIC programming and all my projects are in ASM
Here is what I need:
I have simple code in asm that I am using with my device.
This code is interrupt driven and works just fine for a long time.
I want to add USB connection so I can change some parameters from PC without recompling the code plus have some visualization.
I took Microchip USB host sample and got it working with VB6 application.
This code is in "C" . I stripped it down enough and I know how to pass values from PIC to PC .
Now difficult part - I need to merge two programs, particulary Interrupt section.
I am trying to insert asm code into MAIN.C using _asm _endasm, but I can't fugure out how to declare variables to the same memory area so I can access them from the main loop and interrupt routine.
So if anyone can show me a quick example I really appreciate this.
Thanks
Here is what I need:
I have simple code in asm that I am using with my device.
This code is interrupt driven and works just fine for a long time.
I want to add USB connection so I can change some parameters from PC without recompling the code plus have some visualization.
I took Microchip USB host sample and got it working with VB6 application.
This code is in "C" . I stripped it down enough and I know how to pass values from PIC to PC .
Now difficult part - I need to merge two programs, particulary Interrupt section.
I am trying to insert asm code into MAIN.C using _asm _endasm, but I can't fugure out how to declare variables to the same memory area so I can access them from the main loop and interrupt routine.
So if anyone can show me a quick example I really appreciate this.
Thanks
Attachments
Last edited: