is there a problem with that?
i use PC6 and PC7 as switches
and I want PC2 and PC5 as outputs but these two are not working, the switches works fine.
device is atmega16
inputs and outputs on same port?
- DavidA
- Matrix Staff
- Posts: 1076
- Joined: Fri Apr 23, 2010 2:18 pm
- Location: Matrix Multimedia Ltd
- Has thanked: 58 times
- Been thanked: 258 times
- Contact:
Re: inputs and outputs on same port?
hello hazic,
Some pins may only allow inputs or outputs on them, i would advise you check the datasheet of your particular device to try and locate your pins and whether they provide input and output, or just one of them.
Some pins may only allow inputs or outputs on them, i would advise you check the datasheet of your particular device to try and locate your pins and whether they provide input and output, or just one of them.
Re: inputs and outputs on same port?
Hi David
from what I can see in the datasheet port c can be input/output
but what about the data direction?
it is managed by flowcode when I use OUTPUT or SWITCH components right?
but is it ok to use bothe on the same port?
i dont know wht to do, I even tryied to change the device
from what I can see in the datasheet port c can be input/output
but what about the data direction?
it is managed by flowcode when I use OUTPUT or SWITCH components right?
but is it ok to use bothe on the same port?
i dont know wht to do, I even tryied to change the device
- 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: inputs and outputs on same port?
Hello,
Which version of Flowcode are you using?
Switches and outputs can be used on the same ports. For your outputs are you using single pin mode or do you have masking enabled? If not then you are essentially converting the entire port into an output.
What are you using to test your outputs. Do you have access to a multimeter so you can check the voltage level on the pin?
Which version of Flowcode are you using?
Switches and outputs can be used on the same ports. For your outputs are you using single pin mode or do you have masking enabled? If not then you are essentially converting the entire port into an output.
What are you using to test your outputs. Do you have access to a multimeter so you can check the voltage level on the pin?
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: inputs and outputs on same port?
v4. i use single pin.
yes i have multimeter,to test the outputs i use LEDs . pins C2 and C5 are low, not changing
yes i have multimeter,to test the outputs i use LEDs . pins C2 and C5 are low, not changing
- 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: inputs and outputs on same port?
Hello,
Please can you post up your program and I will have a quick check your doing nothing wrong.
Also please can you post up the C file from the Flowcode project folder so we can check that Flowcode is generating code correctly.
Please can you post up your program and I will have a quick check your doing nothing wrong.
Also please can you post up the C file from the Flowcode project folder so we can check that Flowcode is generating code correctly.
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: inputs and outputs on same port?
thank you for trying to help
problem is solved!
Atmega16 arrives from factory with JTAG enable fuse set and for using all port C pins properly it is nessecary to disable JTAGEN fuse.
problem is solved!
Atmega16 arrives from factory with JTAG enable fuse set and for using all port C pins properly it is nessecary to disable JTAGEN fuse.
- 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: inputs and outputs on same port?
Hello Hazic,
Great glad you got it sorted thanks for letting us know.
Great glad you got it sorted thanks for letting us know.
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