-
All files
07/09/2015 at 22:38 • 0 commentsHi! finally I have all the files needed to work with USB HID custom from microchip relicensed to Apache 2.0, I start to work on MPLABX to include the new files, when I had a error free compiled project I will upload the source files in GitHub.
I uploaded all the source files that microchip sent me, but I uploaded the files in google drive, because GitHub is blocked on my work :( and I don't have internet in home for now so I'm going to I'll go to starbucks to use their internet, so maybe I will take some days.
Well you can now download the relicensed Apache 2.0 source files and play with USB HID custom, modify and distribute the files, now are yours (ofcourse that you need to include the license copy and notice the from microchip, and the notice of modifications that you will do). Have Fun!.
-
Microchip Libraries for Applications and license Apache 2.0 and other news.
07/03/2015 at 23:52 • 0 commentsHi to all, today I have two updates:
First the bad, I last night I found a problem with SPI transference in PIC firmware: it wont work normally if you want to read more bytes than you will transmit, that's because the main FOR loop is dependen only in the numer of bytes to be received, and you know that SPI is an exchange of bytes if you send data also you will receive data, so if you want to read 2 bytes and sent 5 you only sent 2 bytes, I must solve that.
The second is something good, when I decided to upload the source files to GitHub there is a step where you select a license... in that step I begin questioning me "what kind of license I must use?" and "Microchip really want that his source files were distributed by me?" then I do the most logic thing... ask Microchip about that... They responded to me in a couple of days telling me that I can use Apache version 2.0 license in GitHub and then asked me about the list of files that I want to distribute in my project that basically are all files for USB HID custom demo for 18F2550, I send the project in a zip file containing all the files (packaged form) in a couple of days they sent me back almost all the source files nedeed relicensed to Apache 2.0, I say almost all for my mistake, there are two source files that I modified and renamed, so they don't see those files and they don't send me a relicensed versions of those, I email again explaining my mistake and requesting those two files. When I have all the relicensed files I will rebuild the project in MPLABX and upload the project on GitHub.
So with source files licensed with Apache 2.0 for HID custom Device I can distribute the original files, modify and distribute the modified versions without problems.
Stay alert for the Firmware source files update.
-
Google Drive links solved!
06/27/2015 at 05:23 • 0 commentsHi!, today my wife tell me that download links of the project on google drive ask for permission, also I cheked my gmail account and I have some E-mails telling me that some users want permission to the files.
Well is all my fault sorry :S , I forget to give free access permissions to the files... I solved that and give free access, so now you can download the files without ask for permission, if some of you still has problems downloading the files, please tell me, but anyway I will move the files to GitHub in the next days.
-
TODO list
06/26/2015 at 05:08 • 0 commentsThese are the trhee point that I need to do so I can determine that my project is al least finished.
- Improve C# class methods and firmware on EUSART module.
- Implement GPIO methods to control I/O inestead of writting/reading to TRISx, PORTx, LATx registers, so it will be more intuitive to use GPIO if you don't have experience with microchip PIC products.
- Implement UDF (Used Defined Functions) , I need make the PIC program itself and to execute the function programmed.
- Learn how JTAG work and implement it on the PIC, I have a Basys FPGA that I want to program but is only JTAG with LPT, it will be a good target practice.
-
Voltage reference module update
06/26/2015 at 04:50 • 0 commentsHi!, today I update the class files and the MPLABX project, these includes an update to use the voltage reference module of the PIC, now you can have a reference from 0 to 75% of VDD or ony other Vref voltage (below VDD) that can be used for Analog comparator module or simply out that voltage on one pin of the PIC.
Also I uploaded a link to the HEX file (The file is inside the files of the MPLAB project but I want to put a link direct to the file).
Now I need to work to improve the EUSART code, I need do some code in a 16F628 to test the EUSART in Async and Sync modes.
The demos (LED, SPI, ADC) and the Debug App, uses the previous version of the class files dated from Jun/22/2015, the class files in that demos and Debug don't have the update of the Voltage reference module (well... yes it has but not improved like version Jun/25/2015).
-
Update
06/22/2015 at 23:24 • 0 commentsHi, after a long time I update the project:
- New class files.
- New MPLABX project
- ADC, SPI, LED demo, the SPI demo was made to use the MCP3021 ADC from mcirochip
- Debug project, well really isn't a debug itself, is an application that have an space to retrieve 10 SFR values selected from combo box and a space to make your own test application.
All the methods are xml documented, so while you type the method data about it will apear. GPIO, ADC, SPI, I2C, PWM and analog comparator was tested and work OK, USART Synchronous and Asynchronous are tested to work (using logic analyzer) but I need to test with something that can reply I will do some code and a 16F628 to test USART, Voltage reference module isn't tested but today will do that.
Finishing with USART I will start with JTAG and the UDF (User Defined Functions) that I mentioned the last log.
-
After all...
06/08/2015 at 23:35 • 0 commentsHi to all..
Well after thinking a lot I see that are some thing that can't be done in the AccessB like:
- Exact timming control, so applications that use capture or compare modules will can't work properly, but all the configuration word for capture and compare and access to SFR and bits can be done.
- The hardware part of the project is only to serve as pin control, data adcquisition, serial bus communications, etc. the data will be always be processed by the software, so save data in GPR isn't necessary then access to GPR isn't implemented.
- The hardware always work with a Host connected and the Host give the power source to the board, so there isn't necessary to save data in the EEPROM, the project isn't planned to work as a stand alone module.
All the firmware in the PIC uses about 50% of the program memory and that 50% is almost all the functions that I will program, there are two functions that I want to program in the firmware and software class but it will take more time:
- JTAG
- User Defined Functions (UDF): well almost 50% of the program memory will be unused so I want to give the software and firmware the ability to program itself like a bootloader and the firmware can execute that code like a extra function, so the user can make his own firmware function in MPLABX XC8 (that is free to use both) and program in the unused program memory space using an application, and with the class the user can call that function, so in that case the user can have more timming control and it can use capture an compare modules, use the EEPROM or process data inside the PIC.
-
some updates
03/19/2015 at 23:39 • 0 commentsHi to all, well I decided to change some thing in C# code, using methods like:
AccessB.Regvalue(address, value)
Was Ok at the begining, but I decided to change simply to this:
AccessB.TRISA = 0xFF; AccessB.TRISAbits_TRISA0 = 1; PORTAValue = AccessB.PORTA; PORTA_RA0 = AccessB.PORTAbits_RA0;
That is more direct and easy to use, also all the module enable functions will be removed from the PIC firmware, because enabling/disabling is only set or clear bits and that can be done from C# code using the methods to access bit registers. Soon I will upload the files with the updates. -
Eagle files
02/26/2015 at 21:24 • 0 commentsWell, I hope tomorrow can upload the eagle files and a BOM.
-
Files
02/26/2015 at 21:16 • 0 commentsHi to all, I add links to project files of MPLABX and visual studio 2012, the C# program is made for test I2C communications, it is a mess because is for test purpose but it work.
Now I was thinking that the use of capture and compare modules may be have problems, those modules are for precise timming and with USB communications the precisition would be reduced, think about it, if you want to measure the time of some event capture module can be used, so you must sync the begin of that event with the habilitation of capture module, if we consider that the event would be started by the AccesssB we need send a command to start the event (start a timmer, set or clear a I/O pint, etc.) and then send another command for start the capture module that are the TX of two frames of 64 bytes plus the command process time in the PIC and the PC so if the event end before we can start the capture module then we never can measure the correct time, and if the event is started by another uC we need to monitor the start of the event with sequential readings of PORT registers to start the capture module when the event begin between 64 bytes frames the precistion is reduced.
The only solution I can think is implement a method that can take ASM code for the PIC and write to a empty program memory, so anyone can make his/her spesific function and write to the PIC and then execute that function whenever is needed, so the presition will be better.
I know that the PIC can give to the user access to program memory flash, but I need to read more about it and see if my idea can be done, so that will be the last think to do in my list.