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 _________________ mini engineer at https://projectiot123.com |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 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 |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
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?. |
|
|
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 |
|
|
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 |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 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. |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1354
|
|
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. |
|
|
|