USBUART cy8ckit-059

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi! I really need an help. I have got a cy8ckit-059, i want to use it for several sensors and for comunicate with bluetooth with my pc. It's about 7 days that I'm working with it, with several (stupid) mistakes. But there is a very bad situation with my usb uart. It works, and than it stop working. I have installed drivers, reinstalled psoc creator, programmer etc for three time. But The problem remains, the pc doesn't recognize the psoc, I can't understand if it is related with some changes of the clocks of the timers or pwm, but I'm very disappointed. I hope you can give me a solution. The problem happens with not evident cause and disappears...
(I'm searching to read a hy srf05 ultrasound sensor, my schematic is a usbuart (that i can't set as I have seen on youtube alan video, because it's DIFFERENT, a timer udb for the echo, a pwm udb for the trig)

0 Likes
6 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

I recently uploaded few project demos using USBUART for transmitting ASCII data to a PC terminal:

Quad Decoder with Button Switch component for rotary shaft encoders

Try if any of those basic demos sends output to your PC (you will get some greeting like "This is encoder demo..") 

0 Likes
Anonymous
Not applicable

First thank you for the fast answer. I download your files, but I can't test them because I can't find the way to program it... What I have to do after have a cartel with the two inside, and after have opened the workspace?

0 Likes

I assume that you followed installation instructions in readme.txt file and unzipped both demo and library into same folder, and that you can open some basic projects without errors. Now connect KIT-059 and  plug second USB into kit micro- USB port (you don't need to attach encoder). Now build the project and program it into KIT-059. On startup you will see a greeting message in the terminal window (use Putty, RealTerm, TeraTerm, etc.).

0 Likes
Anonymous
Not applicable

Immagine.png

This is the situation with your files.

And follow my code

#include "project.h"

#include <stdio.h>

#include <stdlib.h>

CY_ISR_PROTO(timer_interrupt);

char valore[1];

uint16 periodo;

int main(void)

{

   

    CyGlobalIntEnable;

   

    USBUART_Start(0u, USBUART_5V_OPERATION);

    while(USBUART_GetConfiguration() == 0u);

    USBUART_CDC_Init();

    PWM_Start();

    Timer_Init();

    Timer_Enable();

    Timer_Int_StartEx(timer_interrupt);

    for(;;)

    {

   

    }

}

CY_ISR(timer_interrupt)

{

   

    Timer_ReadStatusRegister(); //Serve per resettare l'interrupt

    periodo = Timer_ReadCapture();

    sprintf(valore,"%d\n\r",50000-periodo);

    USBUART_PutString(valore);

    Timer_Init();

  

 

}

0 Likes

You opened wrong file (a library). Open one of the basic demo projects, like encoder_isr_ex1.cywrk. The goal is to see if your kit-059 is alive and able to communicate with PC by running a proven project.

Inspecting your code is pointless without seeing the entire project: File-> Create Archive Bundle-> minimal.

0 Likes
Anonymous
Not applicable

I opened 2 of your files. encoder_poll_ex2 andencoder_isr_ex1. On both I can obtain on the first trial the tera term serial port and the usb device was found. But it doesn't comunicate any ASCII.
On the other hand, somethimes, maybe after several changes in my code, I can obtain a connection and receive some data, I'm not sure if they are right, I'd like to do some changes but it's not possibile with the recognize problem that returns.
I followed your istructions:

https://ufile.io/7ecjq

0 Likes