Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

user_3700486
New Contributor

I am currently working on a project that consists of a sorting by the bubble method, an initial array is given, the final arrany that is the one that has to be printed on the LCD, and the number of elements of the array. The project it is initially in C and a subroutine in ASM is elaborated. At the moment of executing the code, nothing appears on the LCD, only the initial array. Could you help me find the error on the sorting method or the C call?

C code

1.PNG

ASM Code

3.PNG

Subroutine.h

2.PNG

0 Likes
1 Solution
Bob_Marlowe
Expert II

You are passing NElements as a character which will be interpreted in your subroutine as 0x35. Accessing and changing the data will destroy ram contents.

Use char NElements = 5;

Bob

View solution in original post

0 Likes
1 Reply
Bob_Marlowe
Expert II

You are passing NElements as a character which will be interpreted in your subroutine as 0x35. Accessing and changing the data will destroy ram contents.

Use char NElements = 5;

Bob

View solution in original post

0 Likes