This widget could not be displayed.
Not applicable
Jul 31, 2017
02:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 31, 2017
02:46 AM
Hey everyone,
I am still a beginner with microcontrollers, have some questions and I hope to find some support here.
Currently I am working with the XMC4500 Relax Lite Kit and DAVE 4.
First I want to use a barcodescanner that I would like to connect over the USB port via OTG cable. In the datasheet of the Relax Kit OTG is featured, but this post here: https://www.infineonforums.com/threads/4911-XMC45-Relax-Kit-as-USB-host?p=14635 makes me wondering if it still would work? Has anyone an idea for a workaround?
The second thing is that I have some trouble with a "rg1602 v2" LCD. It has an I2C backpack named "ywrobot lcm1602 iic v1", and exept of the background light it isn't working. I use the "I2C_EXAMPLE_XMC45" project and my main.c looks like this:
However the program sticks after the first data transmit in the while loop.
For any suggestions I would be really thankful!
I am still a beginner with microcontrollers, have some questions and I hope to find some support here.
Currently I am working with the XMC4500 Relax Lite Kit and DAVE 4.
First I want to use a barcodescanner that I would like to connect over the USB port via OTG cable. In the datasheet of the Relax Kit OTG is featured, but this post here: https://www.infineonforums.com/threads/4911-XMC45-Relax-Kit-as-USB-host?p=14635 makes me wondering if it still would work? Has anyone an idea for a workaround?
The second thing is that I have some trouble with a "rg1602 v2" LCD. It has an I2C backpack named "ywrobot lcm1602 iic v1", and exept of the background light it isn't working. I use the "I2C_EXAMPLE_XMC45" project and my main.c looks like this:
#include
#define SLAVE_ADDRESS (0x4E)
uint8_t tx_buffer[64] = { 0b110, 0x1, 0x2, 0x3 };
int main(void)
{
DAVE_STATUS_t init_status;
init_status = DAVE_Init();
if (init_status == DAVE_STATUS_SUCCESS)
{
//Write data to IO EXPANDER
I2C_MASTER_Transmit(&I2C_MASTER_0, true, SLAVE_ADDRESS, tx_buffer, 1,
false);
while (I2C_MASTER_IsTxBusy(&I2C_MASTER_0))
;
I2C_MASTER_Transmit(&I2C_MASTER_0, false, SLAVE_ADDRESS, tx_buffer, 3,
true);
while (I2C_MASTER_IsTxBusy(&I2C_MASTER_0))
;
}
while (1)
{
}
return 0;
}
However the program sticks after the first data transmit in the while loop.
For any suggestions I would be really thankful!
- Tags:
- IFX
4 Replies
This widget could not be displayed.
Not applicable
Aug 03, 2017
03:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 03, 2017
03:46 AM
Short update: The problem with the LCD is solved. It was just one resistor, that wasn't connected correctly..
There is still my other question about the barcodescanner left. So, has anybody experience in connecting USB devices to this board?
There is still my other question about the barcodescanner left. So, has anybody experience in connecting USB devices to this board?
Aug 03, 2017
08:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 03, 2017
08:00 AM
You should use a serial port interface barcode scanner module, which is much easier to use and much faster.
This widget could not be displayed.
Not applicable
Aug 05, 2017
09:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 05, 2017
09:54 AM
Thanks for your reply.
I forget to mention that I have bougth the scanner already and since i have limited money at my disposal, because the project is for my bachelor thesis.
So, there is no way to run it via USB?
I forget to mention that I have bougth the scanner already and since i have limited money at my disposal, because the project is for my bachelor thesis.
So, there is no way to run it via USB?
Aug 05, 2017
09:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 05, 2017
09:45 PM
Still possible.
I propose two approaches:
1. Disassemble your barcode scanner. To my experience, a USB barcode scanner is usually assembled with two major parts: a serial port scanner(the work unit) and a serial to USB/Keyboard interface. But this approach is only recommendable if you have advanced hardware skill.
2. Treat the USB scanner as a USB Keyboard.
I propose two approaches:
1. Disassemble your barcode scanner. To my experience, a USB barcode scanner is usually assembled with two major parts: a serial port scanner(the work unit) and a serial to USB/Keyboard interface. But this approach is only recommendable if you have advanced hardware skill.
2. Treat the USB scanner as a USB Keyboard.
This widget could not be displayed.