Unable to start the chipKit BasicIOShield with PIC32 using PICKIT3 programmer - embedded

I have chipKit uC32 (PIC32MX340F512H) ,chipkit BasicIOShield and PICkit3
programmer all from the Microchip.
I'm using MPLABX IDE.
Since I'm very new to this so I didn't know where to start I have searched and look at the web and find only tutorial which using MPIDE which I'm not allowed to use in my project.
I have read the Reference manual and Data sheet for and make test project but any way the uC32 Board refuse to recognize the BasicIOShield and I was unable to connect this two together.
Any tips and link would be great. Thanks in advance.

In the Basic IO shield Reference manual stated that you should follow some step in order to make the ChipKit to talk to the basic IO shield.
Power on sequence
Apply power to VDD.
Send Display Off command.
Initialize display to desired operating mode.
Clear screen.
Apply power to VBAT.
Delay 100ms.
Send Display On command.
Power off sequence
Send Display Off command.
Power off VBAT.
Delay 100ms.
Power off VDD.
The shield is using SPI2. The following registers are used
RF4, RF5, RF6 and RG9
Also you must change the jumper in the uC32 from LED4 to JP4 and JP8.
in the Appendix B of the reference manual of the basic IO shield is an example code which is useful.

Related

How to add double tap detection to sample app gatt_sensordata_app?

I am developing an Android app that gets data from Movesense using the GATT profile from the sample app GATT Sensor Data App here.
I followed the tutorial available here. Building the app and getting the DFU worked fine. I can get IMU, HR and temperature data with no issues.
Now I'd like add a tap detection feature to my app. I understand that I have to subscribe to 'System/States', but first I need to be able to receive the system state data.
I understand that I need a modified DFU for that, but I don't understand what changes I should make in which files of the gatt_sensordata_app before rebuilding and generating the new DFU.
What changes should I make in order to broadcast /System/State data?
(I usually just deal with Android so apologies for the very basic question.)
I tried adding #include "system_states/resources.h" to GATTSensorDataClient.cpp but I don't know how to continue.
The normal data straming in the gatt_sensordata_app uses the sbem-encoding code that the build process generates when building the firmware. However /System/States is not among the paths that the code can serialize. Therefore the only possibility is to implement the States-support to the firmware.
Easiest way is to do as follows:
In your python app call data subscription with "/System/States/3" (3 == DOUBLE_TAP)
Add a special case to the switch in onNotify which matches the localResourceId to the WB_RES::LOCAL::SYSTEM_STATES_STATEID::LID
In that handler, return the data the way you want. Easiest is to copy paste the "default" handler but replace the code between getSbemLength() & writeToSbemBuffer(...) calls with your own serialization code
Full disclosure: I work for the Movesense team

How to find ARA-M sample APDUs?

I am trying to interface an applet in my USIM and an Android application.
I know that I have to install ARA-M applet on USIM in order to check access controls and submit my application-AID as a rule to communicate.
I checked this link and installed it on my sim, but I cannot communicate with this applet, all samples are using GlobalPlatformPro. when I run a commands like gp.exe --list, it returns 0x57 from ScardTransmit function which means ERROR_INVALID_PARAMETER and I don't know how to fix it.
Now I have 2 questions:
1) How can I fix GlobalPlatformPro error in order to run ARA-M samples?
2) How can I find standard commands for this applet (some sample APDUs to communicate and add access control rules)?
Thank you for helping.
I found the answer.
There is a paper on the matter here. It is a good place to get started. Global Platform has a repository here where you can find ARA applet and four test applets to get started.
The Global Platform Secure Element Access Control can also be a useful reference for those who are at the start point, like me.

How to run baremetal application on Altera Cyclone V SoC using HPS loading from SD card

I have a Terasic DE1-SoC board and I want to run a simple led-blinking baremetal application with using HPS.
I've learned HPS tech ref, HPS Boot guide, SoC EDS guide and followed all instructions to run my app.
Here's a brief list of my steps.
Create a system in QSYS with HPS component and some PIOs (for on-board leds and buttons)
Run bsp-editor to create a preloader. I want to run from SD card so I check BOOT_FROM_SDMMC option. Also i want my app to be in FAT partition (check FAT_SUPPORT, FAT_BOOT PARTITION 1, FAT_LOAD_PAYLOAD_NAME test.img (or should it be test.bin?)) Uncheck WATCHDOG_ENABLE. I want to see booting of preloader process in serial connection, so I check SERIAL_SUPPORT. Other settings keep unchanged.
Type "make" in SOC EDS 15.0 command shell to obtain preloader-mkpimage.bin
Write preloader-mkpimage.bin by typing alt-boot-disk-util on sd card with FAT32 partition and custom partition A2.
Create simple app in DS-5, compile it and obtain test.axf then convert it to test.bin using fromelf command and then convert it in test.img with mkimage tool.
Drag-n-drop test.img on sd card FAT32 partition.
Insert it in board and power up
Load .sof on board (my system FPGA-HPS)
Reset HPS by pressing reset button
So the problem is that there is nothing going on in serial connection so i thing that preloader isn't working at all, HPS reset not helping.
I don't see even "<0>" in terminal, just blank page.
I've tried prebuilt images with linux provided by Terasic they are working on 100%.
I do everything according altera docs but nothing is working.
Even official example altera-socfpga-hardwarelib-unhosted isn't working. I've tried to use their preloader from example, but in terminal window I see only "<0>" symbol when I reset HPS.
By the way App is working only in debugger DS5 with inserted SD card and loaded .sof file on board. I don't clearly understand the meaning and the way of writing of .scat file. Don't understand what load address and entry point should I use when I use mkimage tool when converting test.bin->test.img (should i do this convertion or use in BSP settings test.bin???) In my opinion main problem is incorrect preloader. What is the problem with it?
Please help!
UPD: After editing HPS part in QSYS (UART module was added) and re-generating system and re-building preloader (other previous settings was not changed) I started to receive correct messages in terminal about successfull loading of U-boot SPL. But still can't run test.img. Working on it.
UPD2: Ok, I solved this problem, now it's working fine

Send DDC/CI commands to monitor on Windows using VB.NET?

I'm working on a program to automatically change the brightness of my displays directly using DDC/CI. Currently I'm using ScreenBright's command line arguments to do this just to get things working, but I would like to move to doing it directly now that things are working.
There is a Windows API, the Monitor Configuration API, to do this, but I don't know how to integrate this into my project, and any usage is only given in C++. The only other thing I can find is doing this from Python, which is no use either.
Any help would be much appreciated.

Monitor process api calls windows 7 vb.net/C# or C++

Currently i'm working on a security monitoring app that continuously monitor new processes created.
For that im using wim and event watcher, witch works fine in VB.NET.
But there are 2 features that im missing.
I need to monitor process API calls, and I've been searching the web like mad, and come up empty.
Basically i need to monitor process WaitForSingleObject, LoadLibraryA, CreateProcessW and WriteProcessMemory. And registry access/changes as well.
Im hoping this can be done without a system wide hook, but form what i can find, it cannot be done via WMI.
So the question is, how to, and what can i do with managed code.
I'm gonna focus on the second point as i don't have experience on your first.
For checking if a process is signed i am using the sigcheck.exe from Mark Russinovich, because of the various methods it uses to verify files. Some are catalogsigned, some have the key embedded, there is iirc another weird method. There is no easy way to do it yourself. Had weird false detections with trying self-built methods to cover all possibilities. Hope that info helps