jumper2high
Full Member level 3
pic18f tutorial
Hello Folks,
I finally laid my hands on a couple of 18Fs that I wanted to try out with USB. I've done all the typical stuff, got the datasheet, went through the basics, still getting used to the slightly different memory organization (compared to 16Fs), and more freedom .
Anyway, I've searched all around for a USB tutorial specific to that series of MCUs, and I haven't found almost anything. I already went through the "USB" chapter of the datasheet, and I understand that part, but it really doesn't say much on how to actually "communicate". For example, when working with PWM, you set all the registers the way you want them, and turn on the module by setting a bit - and it does it's thing the way you set it. This doesn't seem to be the case with USB, it seems - because you set some things, you enable the module...and what then? The Host and the device are supposed to have a little chat about who is who and what is what, and then what happens? How do I make the MCU actually send something out?
P.S. I'm quite good with C (done many programs for Windows and Linux using C) but I've never really liked C for MCUs, I don't know why. Instead, I've either done it in ASM or Basic (had a neat little simulator specifically designed for these PICs and it had a nifty little Basic compiler that had several important things built in as procedures/macros). So, when I go through the example C code from Microchip website, I really don't get anything...mainly because I'd have to look at 16 different sources and headers just to understand what is being done to "initialize" the USB module.
Help is greatly appreciated
EDIT: I've changed the topic title to avoid confusion.
Hello Folks,
I finally laid my hands on a couple of 18Fs that I wanted to try out with USB. I've done all the typical stuff, got the datasheet, went through the basics, still getting used to the slightly different memory organization (compared to 16Fs), and more freedom .
Anyway, I've searched all around for a USB tutorial specific to that series of MCUs, and I haven't found almost anything. I already went through the "USB" chapter of the datasheet, and I understand that part, but it really doesn't say much on how to actually "communicate". For example, when working with PWM, you set all the registers the way you want them, and turn on the module by setting a bit - and it does it's thing the way you set it. This doesn't seem to be the case with USB, it seems - because you set some things, you enable the module...and what then? The Host and the device are supposed to have a little chat about who is who and what is what, and then what happens? How do I make the MCU actually send something out?
P.S. I'm quite good with C (done many programs for Windows and Linux using C) but I've never really liked C for MCUs, I don't know why. Instead, I've either done it in ASM or Basic (had a neat little simulator specifically designed for these PICs and it had a nifty little Basic compiler that had several important things built in as procedures/macros). So, when I go through the example C code from Microchip website, I really don't get anything...mainly because I'd have to look at 16 different sources and headers just to understand what is being done to "initialize" the USB module.
Help is greatly appreciated
EDIT: I've changed the topic title to avoid confusion.