i interfaced two flow sensors to ADC module and viewed the output in software serial terminal , it is fine i got the output. if i tried to interface more than four analog sensors the serial terminal is not working. how can i rectify this problem.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
i interfaced two flow sensors to ADC module and viewed the output in software serial terminal , it is fine i got the output. if i tried to interface more than four analog sensors the serial terminal is not working. how can i rectify this problem.
it is working fine for 3 sensors. If i try to interface 6 sensors it is not working Sir. 1307.sys_main.c
You should upload your entire project. It seems like you are trying to trigger group1 conversions using GIOB[0]. However the adcInit() function configures the group1 trigger source as follows:
adcREG1->G1SRC = (uint32)0x00000008U | (uint32)ADC1_EVENT;
ADC1_EVENT is defined as 0, so the above statement will write 0x8 into the G1SRC register. This means that the conversions for group1 are triggered by a rising edge on AD1EVT pin, not GIOB[0].
It would really help if you upload the entire project.
4428.fine.rari have attached the rar file of my project. please find the attachment
HALCoGen allows you to configure the trigger source correctly. To select GIOB[0] as the trigger source, you need to go to the ADC1 Group1 tab and select GIOB0 from the pull-down menu. See below:
I have also corrected some non-critical portions of your project. This had to do with the text display on the terminal. The modified project is attached. Below is a screenshot showing all 6 channel conversions displayed.
This should close this topic.
Thanks a lot Mr. sunil Oak. one last question related to sensor interface. by enabling the ADC group 1 Channel pins and by increasing array size in the program, is it possible to interface more sensors.
Thanks and regards
K.Manjunathan
PSGIAS.
Yes, the RM48x MCUs support up to 24 ADC input channels for ADC1 and up to 16 input channels for ADC2 (all shared with ADC1). The array size can be managed in software to store the number of results you want.
You can also make three different sets of input channels and assign them to three different conversion groups. Then you can define how to trigger each conversion group separately. You can configure all this using HALCoGen.
Regards, Sunil