Don't know how to use EB003 light sensor.
Don't know how to use EB003 light sensor.
hi, whats up? i don't know how i can use EB-003 sensor board, i dont know if there a component in flowcode, or what. How i can read from flowcode the sensor values?. I have looking for examples or something but i havent found nothing. I read the datasheet but its not very extensive. I have seen that there is a test file called sensor.hex on matrixmultimedia.com but i cannt find out...
Thank you very much !
Regards,
Diego.
Thank you very much !
Regards,
Diego.
-
Sean
- Valued Contributor

- Posts: 548
- Joined: Tue Jun 26, 2007 11:23 am
- Has thanked: 6 times
- Been thanked: 44 times
Re: Don't know how to use EB003 light sensor.
The EB003 board provides access to three analogue signal sources and a digital input and output. To read the analogue signals the EB003 must be connected to an analogue capable port (ie. Port A of a PIC16F877a).
The Flowcode ADC component can be used to read the analogue signal values.
In the default configuration the LDR signal is connected to port pin 0 (ADC channel 0).
The potentiometer RV1 is connected to port pin 1 (ADC channel 1)
The full data sheet for the EB003 is available from our website.
The Flowcode ADC component can be used to read the analogue signal values.
In the default configuration the LDR signal is connected to port pin 0 (ADC channel 0).
The potentiometer RV1 is connected to port pin 1 (ADC channel 1)
The full data sheet for the EB003 is available from our website.
Re: Don't know how to use EB003 light sensor.
Ok, thank you very much. Just one question, what do you mean with full data sheet? i have downloaded EB 003 data sheet but im not sure if its full becouse there arent enough information.
Regards,
Diego.
Regards,
Diego.
- 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: Don't know how to use EB003 light sensor.
Hello
Yes the EB003 datasheet should be enough to get up and running. What do you think is missing from the datasheet and I will look into this for you.
Yes the EB003 datasheet should be enough to get up and running. What do you think is missing from the datasheet and I will look into this for you.
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: Don't know how to use EB003 light sensor.
well i dont know how to read correctly with ADC componnet, Should i do a SampleADC first, and then ReadAsInt ? this is my code, can you check if this correct?.
i press D0 switch from switches board and i get a value but if i press continue it doesnt work like i expect.
Thank you, really.
Regards,
Diego.
i press D0 switch from switches board and i get a value but if i press continue it doesnt work like i expect.
Thank you, really.
Regards,
Diego.
- Attachments
-
- ProbandoSensor.fcf
- (7.5 KiB) Downloaded 363 times
- 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: Don't know how to use EB003 light sensor.
Hello
Ok I have changed your program slightly to allow the LCD to operate a bit better.
The program should now work as you are expecting where pressing switch 0 allows a sample to be taken and displayed.
Ok I have changed your program slightly to allow the LCD to operate a bit better.
The program should now work as you are expecting where pressing switch 0 allows a sample to be taken and displayed.
- Attachments
-
- ProbandoSensor.fcf
- (8 KiB) Downloaded 391 times
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: Don't know how to use EB003 light sensor.
hi benj, well no, it doesnt work. I cannt understand. at the begining it writes Sensor values, but when i press SW0 it disappears and the lCD doesnt show anything.
regards,
Diego
regards,
Diego
- 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: Don't know how to use EB003 light sensor.
Hello
How do you have your switch wired?
Is the problem in simulation or on the real device?
If you are using the Switch E-Blocks then are you supplying the +V wire connection.
If you are using your own switch then is the input pin ever left floating?
How do you have your switch wired?
Is the problem in simulation or on the real device?
If you are using the Switch E-Blocks then are you supplying the +V wire connection.
If you are using your own switch then is the input pin ever left floating?
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: Don't know how to use EB003 light sensor.
hello, well i have EB007 switch board and yes im supplying the +V IN wire connection.
The problem is in real device, simulation works correctly.
Is this the correct way to take values from a sensor? i want mean with waituntilhigh and waituntillow...
really, thank you very much.
regards,
Diego.
The problem is in real device, simulation works correctly.
Is this the correct way to take values from a sensor? i want mean with waituntilhigh and waituntillow...
really, thank you very much.
regards,
Diego.
- 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: Don't know how to use EB003 light sensor.
Hello Diego
I have just tried the program I sent back to you here on my hardware and it is working as expected. I cannot see any reason for the LCD to go blank other then the power cable becoming loose etc. Pressing the switches should not have the effect of clearing the display unless you are using your version of the program which did clear the display when you pressed the switch. The only other thing I can think of is that the switch is somehow shorting 5V to ground. You can confirm if this is happening by watching the Green LED on the EB006 when you press the switch.
I have just tried the program I sent back to you here on my hardware and it is working as expected. I cannot see any reason for the LCD to go blank other then the power cable becoming loose etc. Pressing the switches should not have the effect of clearing the display unless you are using your version of the program which did clear the display when you pressed the switch. The only other thing I can think of is that the switch is somehow shorting 5V to ground. You can confirm if this is happening by watching the Green LED on the EB006 when you press the switch.
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: Don't know how to use EB003 light sensor.
hello Ben.
Well, i dont know. becouse if i only place printstring("here") and then clear, this work perfectly (i want mean between waituntilhigh nad waituntillow). The problem is when i use sample, andr readasint.
If i try the program which i'm sending to you now, i can do like 3 measurement and then LCD go to blank and if i press more appear symbols in LCD like ? ? -. And if i press more times i get values from LCD sometimes and sometimes blank and sometimes symbols.
Thanks you.
Regards,
Diego.
Well, i dont know. becouse if i only place printstring("here") and then clear, this work perfectly (i want mean between waituntilhigh nad waituntillow). The problem is when i use sample, andr readasint.
If i try the program which i'm sending to you now, i can do like 3 measurement and then LCD go to blank and if i press more appear symbols in LCD like ? ? -. And if i press more times i get values from LCD sometimes and sometimes blank and sometimes symbols.
Thanks you.
Regards,
Diego.
- Attachments
-
- ProbandoSensor.fcf
- (7.5 KiB) Downloaded 351 times
- 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: Don't know how to use EB003 light sensor.
Hello Diego
Which version of Flowcode ar you using? I have just tried again with V3.6.11.53 and the program is running on the hardware correctly and reliably.
Please can you attach the C code generated by your program and I will see if there is anything here that could potentially cause a problem.
Which version of Flowcode ar you using? I have just tried again with V3.6.11.53 and the program is running on the hardware correctly and reliably.
Please can you attach the C code generated by your program and I will see if there is anything here that could potentially cause a problem.
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: Don't know how to use EB003 light sensor.
Hello Ben.
Of course i can, well i'm using v 3.4.7.48.
Regards,
Diego.
Of course i can, well i'm using v 3.4.7.48.
Regards,
Diego.
- Attachments
-
- ProbandoSensor.c
- (12.33 KiB) Downloaded 305 times
- 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: Don't know how to use EB003 light sensor.
Hello Diego
OK The C code all looks correct to me but there must be something happening that is corrupting the output you are sending to PortB.
Firstly I would upgrade to V3.6 as this contains a number of bug fixes.
http://www.matrixmultimedia.com/support ... .php?t=541
Secondly if you are still getting the LCD corruptions problem then you can try moving the LCD start macro inside your program loop. This will act to clear the display but will also keep the display under control if the port pins are still being corrupted.
It might also be worth trying a different microcontroller just incase the one you are using has become damaged for some reason.
OK The C code all looks correct to me but there must be something happening that is corrupting the output you are sending to PortB.
Firstly I would upgrade to V3.6 as this contains a number of bug fixes.
http://www.matrixmultimedia.com/support ... .php?t=541
Secondly if you are still getting the LCD corruptions problem then you can try moving the LCD start macro inside your program loop. This will act to clear the display but will also keep the display under control if the port pins are still being corrupted.
It might also be worth trying a different microcontroller just incase the one you are using has become damaged for some reason.
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: Don't know how to use EB003 light sensor.
Hello Ben,
I have done everything which you said and it doesnt work. But i have changed LCD board to LED board and then work perfectly. Maybe LCD board has become damaged when i suplied with 14V?
anyway i have bought another LCD board, when i get it and test i'll tell you if this was the problem.
Thanks Ben for all your help.
Regards,
Diego.
I have done everything which you said and it doesnt work. But i have changed LCD board to LED board and then work perfectly. Maybe LCD board has become damaged when i suplied with 14V?
anyway i have bought another LCD board, when i get it and test i'll tell you if this was the problem.
Thanks Ben for all your help.
Regards,
Diego.