Issues with APA102C Model

Discussion on both general simulation and Proteus VSM microcontroller simulation.
Post Reply
Aussie Barry
Professional User
Posts: 20
Joined: Sat 2018-01-06 1:40

Issues with APA102C Model

Post by Aussie Barry »

Hi All,

Living in Covid lockdown has given some extra time to play with a few projects I have been pondering for some time.
I have compiled a program in Microchip XC8 for the PIC16F1825 to drive a string of APA102C LEDs via SPI - project attached.
The program is quite simple: toggle an array of 30 x APC102C LEDs (Blue) on and off at 1 second intervals.
A "heartbeat" LED on RC3 shows the circuit is alive.
My original idea was to keep the Blue LEDs fixed at full brightness and merely toggle the Global LED power setting.
This concept works in real hardware but not in simulation - the LEDs remain at full brightness.
Toggling the Blue LED setting from 0xFF to 0x00 works in simulation.
Look at lines 110 and 111 of the embedded main.c file for details.
As written, the simulation works as expected but comment out line 111 and uncomment line 110 and the simulation does not function as it does in real hardware.

Is this a bug in the APA102C model?

Any input on what might be going wrong with the simulation would be greatly appreciated.

Cheers
Barry
(Sydney)
Attachments
SPI_Test_16F1825.pdsprj
(22.05 KiB) Downloaded 267 times
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Issues with APA102C Model

Post by Ettore »

It looks like as the 5-bit Brightness control is not implemented or doesn't work in the model.
I'll look at this if a solution can be found.
Kind regards,
Ettore Arena - Labcenter Electronics.
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Issues with APA102C Model

Post by Ettore »

I fixed such the bug. It will be in the next Proteus service pack.
Kind regards,
Ettore Arena - Labcenter Electronics.
Aussie Barry
Professional User
Posts: 20
Joined: Sat 2018-01-06 1:40

Re: Issues with APA102C Model

Post by Aussie Barry »

Thanks you Ettore.
Do you have any idea when the next service pack will be released?

Cheers
Barry
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Issues with APA102C Model

Post by Ettore »

New Proteus 8.13 build was released few days ago, so I have no idea when it could be a next service pack. Sorry.
Kind regards,
Ettore Arena - Labcenter Electronics.
Aussie Barry
Professional User
Posts: 20
Joined: Sat 2018-01-06 1:40

Re: Issues with APA102C Model

Post by Aussie Barry »

Thanks Ettore.

Is there any chance you can PM the corrected model to me so that I can continue my design efforts until the next service pack is released?

Cheers
Barry
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Issues with APA102C Model

Post by Ettore »

If you had looked closely at your PM you would not have asked last question.
Kind regards,
Ettore Arena - Labcenter Electronics.
Aussie Barry
Professional User
Posts: 20
Joined: Sat 2018-01-06 1:40

Re: Issues with APA102C Model

Post by Aussie Barry »

Hi Ettore,

The new APA102C model appears to have solved the 5-bit global power issue however I am now having another strange problem that I would like you to investigate.
I modified my previous project to include 30 x single APA102C devices expecting these 30 individual LEDs to perform in the same manner as the 30-way LED strip. Unfortunately the individual LEDs perform very differently.

Please look at the attached project and advise why the 30 x single LEDS do not light up as a contiguous strip.

Cheers
Barry
Attachments
SPI_Test_16F1829.pdsprj
(37.91 KiB) Downloaded 196 times
Post Reply