Hi,
I have been struggling with this probelm for a while: I am using ECIO 40P(ADC0) to read voltage from a pot and output to flash LEDs. The code works fine in Flowcode, but it doesn't seem to work at all when I load the program into the board. I have attached the .fcf file. Anyone have suggestions please?
Further infor about hardware connection: analogue signal input into RA0 is measured to be ok by multimeter and no voltages at PORTB at all. The board was tested to be working by flashing LEDs program.
Thanks for your help in advance.
Best Regards
Charles
ECIO 40P/ADC/LEDs
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ECIO 40P/ADC/LEDs
Hello Charles
Ok I have spotted the problem. In the interrupt enable icon you are selecting T0CKI as the source of the clock. This is an external signal to drive the timer module. If you wish to use the internal clock as the timer source then change the T0CKI to CLKO in the interrupt properties.
Ok I have spotted the problem. In the interrupt enable icon you are selecting T0CKI as the source of the clock. This is an external signal to drive the timer module. If you wish to use the internal clock as the timer source then change the T0CKI to CLKO in the interrupt properties.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ECIO 40P/ADC/LEDs
Hi Ben,
Thanks for your reply. It works now! Although I didn't realise the problem before, I tried to delete calling interrupt marco and put them in the main loop and it worked as well.
Here I have another question: can ECIO 40P be used to communicate with PC through RS232 without using the e-blocks RS232 board? My task is to transmit the result from ADC through TX(RC6) to PC.
Thanks for your help.
Best regards
Charles
Thanks for your reply. It works now! Although I didn't realise the problem before, I tried to delete calling interrupt marco and put them in the main loop and it worked as well.
Here I have another question: can ECIO 40P be used to communicate with PC through RS232 without using the e-blocks RS232 board? My task is to transmit the result from ADC through TX(RC6) to PC.
Thanks for your help.
Best regards
Charles
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ECIO 40P/ADC/LEDs
Hello
Yes you can knock up a RS232 to PIC bus by using resistors and a diode but its not very cool for use in a commercial design or a long term reliable design.
http://bobblick.com/techref/projects/lc ... cdterm.gif
The RS232 E-Block uses a MAX232 chip to convert the 0V and 5V into the standardised RS232 voltage levels -12V and +12V.
Better option would be to use the USB Serial component and use the USB bus rather then the RS232. This way you can use the ECIO as is with no extra circuitry.
Download the latest version of Flowcode for the USB components and download the USBpack for Flowcode example files.
http://www.matrixmultimedia.com/Downloa ... k.php?id=2
http://www.matrixmultimedia.com/FlowcodeUSBPack.php
Yes you can knock up a RS232 to PIC bus by using resistors and a diode but its not very cool for use in a commercial design or a long term reliable design.
http://bobblick.com/techref/projects/lc ... cdterm.gif
The RS232 E-Block uses a MAX232 chip to convert the 0V and 5V into the standardised RS232 voltage levels -12V and +12V.
Better option would be to use the USB Serial component and use the USB bus rather then the RS232. This way you can use the ECIO as is with no extra circuitry.
Download the latest version of Flowcode for the USB components and download the USBpack for Flowcode example files.
http://www.matrixmultimedia.com/Downloa ... k.php?id=2
http://www.matrixmultimedia.com/FlowcodeUSBPack.php
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ECIO 40P/ADC/LEDs
Hi Ben,
Another couple questions:
Do I have to be full licensed to use USB pack?
If I use USBserial, is it compatiable with .Net framework?
Thanks
Charles
Another couple questions:
Do I have to be full licensed to use USB pack?
If I use USBserial, is it compatiable with .Net framework?
Thanks
Charles
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ECIO 40P/ADC/LEDs
Hello Charles
Yes im afraid a full license is required to compile the USB pack.
.Net is unable to talk directly with a COM port, suprise suprise. However by adding in even more clutter to the .Net build it looks like there is a way to make it work.
Please see this page.
http://software.techrepublic.com.com/ab ... ocid=82874
If you wish to use .Net then the USBSlave component might be a better match as it is likely that even .Net can directly interface with a DLL.
Yes im afraid a full license is required to compile the USB pack.
.Net is unable to talk directly with a COM port, suprise suprise. However by adding in even more clutter to the .Net build it looks like there is a way to make it work.
Please see this page.
http://software.techrepublic.com.com/ab ... ocid=82874
If you wish to use .Net then the USBSlave component might be a better match as it is likely that even .Net can directly interface with a DLL.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel