I have switched to Microchip pic18f2550 as my main micro-controller now and the debugging mode in the MPLAB is working fine for this chip. To write firmware codes for the usb module of the micro-controller, I have to install and study the Microchip USB Framework. It can be downloaded from here .The examples given by the framework are quite confusing and vast as there are a lot of header files and function call. After spending quite a few days studying the firmware coding and other examples from the internet, I discovered some precaution to take note. I am using the firmware from piccoder as the base foundation.
a) In the configuration bits, VREGEN (USB voltage regulator) must be enabled so that the pull-up resistor on the D+/D- will work. (For the host to detect whether the device is a high-speed (D+) or low-speed(D-) one)
b) The lines #define USE_SELF_POWER_SENSE_IO & #define USB_USB_BUS_SENSE_IO must be commented.
c) 220nF capacitor must be tied to Vbus as recommended by the datasheet.
d) Two 15pF capacitors must be connected to the 20Mhz Crystal as recommended by the datasheet.
e) D+/D- lines must be connected closely to the micro-controller and jumper wires should be as short as possible to reduce noise and interference.
After multiple tries, I don't have much progress. I am getting "USB device is not recognized" when I plugged in the device to the computer. It is quite frustrating for the Microchip USB framework.
Software interface
Since I am stuck in the firmware coding, I decided to spend some time on the software side first as I am going to have my fyp progress interview soon on the 22-Dec. I am using Microsoft Visual Basic .Net express 2008 (with WINUSB API) with zedgraph plug-in control for plotting the graph. Zedgraph is quite a nice plug-in with well-documented faqs and coding. I am quite pleased with the progress that I have made in the software part as I have managed to design the software interface and simulate the input values and plot the values in real-time. Please see screen below for my user interface:
1) Channel A - Simulating a sine waveform in real-time
2) Channel B - Plotting the values from the 5 textboxes in real-time
1 comment:
Hey I know this іѕ οff topic but I was wondeгing
if уou κnew оf anу widgets I could adԁ to my blog that autοmaticаlly tweet my newest twіtteг uрdates.
I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.
My website :: Http://Www.Zemos98.Org
Post a Comment