I have attached the schematic layout of STM32F103C6 Series, attached to a virtual terminal with transmitting and receiving lines mentioned and the pin PA2 is used as an ADC input pin.
I have also configured the power rails , which is shown in the image attached below.
The code written in the stmcubeide is attached below, where I declared test as an unsigned integer of 16 bits and character msg of length 10.
Then I have written the code for starting the ADC and then stopping for Conversion whereafter I have retrieved the values from HAL_ADC_GetValue and transmited to the virtual monitor by the help of UART Transmit function.
Then I have build my program and converted into hex file whereafter I copied its path to the proteus stm32 model's program file.
The output I am getting for this simulation is 0 irrespective of the voltage I am giving in PA2 which is also attached below.
It would be very helpful If you guys could assist me on this issue.
Why is my ADC only showing zero as an output while simulating the stm32f103C6 model in proteus?
-
- Unlicenced User
- Posts: 2
- Joined: Sun 2023-10-29 12:02
Why is my ADC only showing zero as an output while simulating the stm32f103C6 model in proteus?
- Attachments
-
- Krishnangshu_2-1696935105658.png (54.92 KiB) Viewed 830 times
-
- Krishnangshu_1-1696935020724.png (42.01 KiB) Viewed 830 times
-
- Krishnangshu_0-1696934804825.png (51.31 KiB) Viewed 830 times
Re: Why is my ADC only showing zero as an output while simulating the stm32f103C6 model in proteus?
Could you please attach here your Proteus project (.pdsprj file) including source code files ? So that we can have it a look.
Kind regards,
Ettore Arena - Labcenter Electronics.
Ettore Arena - Labcenter Electronics.
-
- Unlicenced User
- Posts: 2
- Joined: Sun 2023-10-29 12:02
Re: Why is my ADC only showing zero as an output while simulating the stm32f103C6 model in proteus?
The proteus project and the is attached below but I am not able to attach the main.c file from the stm32cubeide.
- Attachments
-
- stm32.pdsprj
- (14.82 KiB) Downloaded 333 times
Re: Why is my ADC only showing zero as an output while simulating the stm32f103C6 model in proteus?
Hi,
Unfortunately you need to purchase a licence in order to receive support. Using a cracked / illegal copy of the software doesn't warrant support. Sorry.
https://www.labcenter.com/pricing/comm/
Regards,
Dave.
Unfortunately you need to purchase a licence in order to receive support. Using a cracked / illegal copy of the software doesn't warrant support. Sorry.
https://www.labcenter.com/pricing/comm/
Regards,
Dave.