HerbertMunch
New Member
Can anyone tell me how id go about using a 18F4550 to make a crude data logger?
I want to use the microchip custom driver and framework (not CDC library) to send updates about the state of a port.
Im looking at the code in the User.C file of the framework:
The way that this code work is that the usb host makes a request, and then the a packet is sent back.
How do i go about sending a stream of data with the framework? its not really ideal to keep having to request the data each time.
Also i cant just sit in the above method waiting and logging, as the usb needs servicing regularly.
ive tried looking for information, but I find all this USB lark quite confusing.
Anyway thanks for any help that is offered.
I want to use the microchip custom driver and framework (not CDC library) to send updates about the state of a port.
Im looking at the code in the User.C file of the framework:
Code:
void ServiceRequests(void)
{
byte index;
if(USBGenRead((byte*)&dataPacket,sizeof(dataPacket)))
{
counter = 0;
switch(dataPacket.CMD)
{
case READ_VERSION:
//dataPacket._byte[1] is len
dataPacket._byte[2] = MINOR_VERSION;
dataPacket._byte[3] = MAJOR_VERSION;
counter=0x04;
break;
The way that this code work is that the usb host makes a request, and then the a packet is sent back.
How do i go about sending a stream of data with the framework? its not really ideal to keep having to request the data each time.
Also i cant just sit in the above method waiting and logging, as the usb needs servicing regularly.
ive tried looking for information, but I find all this USB lark quite confusing.
Anyway thanks for any help that is offered.