View previous topic :: View next topic |
Author |
Message |
microjack64
Joined: 10 Apr 2020 Posts: 7
|
pic tris e port |
Posted: Fri Apr 10, 2020 4:25 am |
|
|
I am having a problem with my trise port. I have pin 9 set to output. I am outputting to a relay. I use the command out high to turn it on. The relay then gets blinking . I use gpio- g write 9 1 to turn it back on. The relay gets blinking high speed. How do I solve it ? Thank you ![Shocked](images/smiles/icon_eek.gif) _________________ mini engineer at https://projectiot123.com |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9177 Location: Greensville,Ontario
|
|
Posted: Fri Apr 10, 2020 4:41 am |
|
|
You really need to post your complete program. Just a small version but complete, so we can cut/paste/compile/test.
Also post what version of the compiler you're using
and what rating the power supply is !
The more information you supply, the faster/better we can help you.
Jay |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19378
|
|
Posted: Fri Apr 10, 2020 4:59 am |
|
|
Repeat 50*.
I must always say what chip and what compiler version.
Pin 9 tells us nothing. Different on any one of the thousands of
different PIC models.
There is probably something like a peripheral that defaults to being
on the pin, but we have no hope of telling you this unless we know
what chip is involved.
You then also talk about "gpio- g write 9 1".
That is not a CCS instruction.
This forum is for help with the PIC using CCS C.
Are you using CCS C?. |
|
![](templates/subSilver/images/spacer.gif) |
microjack64
Joined: 10 Apr 2020 Posts: 7
|
pic tris e port |
Posted: Fri Apr 10, 2020 7:05 am |
|
|
Ok i will collect all data and proteus simulation also code.
Thanks for reply. _________________ mini engineer at https://projectiot123.com |
|
![](templates/subSilver/images/spacer.gif) |
microjack64
Joined: 10 Apr 2020 Posts: 7
|
pic tris e port |
Posted: Fri Apr 10, 2020 7:08 am |
|
|
My other question is how to add code in this forum ?
Because in other forums he telling me some basics technique of adding code in ths forum.
Thanks a lot. _________________ mini engineer at https://projectiot123.com |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9177 Location: Greensville,Ontario
|
|
Posted: Fri Apr 10, 2020 7:30 am |
|
|
To 'add' code...
'cut' it from your editor.
Click on the 'code' button, just above font size normal.
'Paste' in in this area, the message body.
Click on the 'code' button again.
That should 'reformat' the program and change it's colour.
If this is ONLY a PROTEUS simulation, we can't really help. Proteus is a defective program, has been for years. |
|
![](templates/subSilver/images/spacer.gif) |
jeremiah
Joined: 20 Jul 2010 Posts: 1329
|
|
Posted: Fri Apr 10, 2020 11:15 am |
|
|
A side note, for CCS 99% of the time you don't need to specify the TRIS setting. Avoid using fast_io and fixed_io so that the compiler can set the TRIS for you. By default the compiler will do this for you as long as you don't tell it otherwise. |
|
![](templates/subSilver/images/spacer.gif) |
|