Are you all right
1. I didn't start this thread
2. I didn't write the code that was posted
3. All I did was try the poster code
4. And your code
5. I posted why it didn't run.
6 I said this on page 2 PORT configuration are wrong
And now we have a baby show of who is right and wrong I don't no about you
but I was trying to help the poster
no reason to jump up and down declaring your intent: we don't question the least bit of your intent to help the others. and you shouldn't either.
and in my very first post on this very thread, I said that "I assume the port configurations are right" - I simply didn't have time to check it out, and I took that as rudimentary for anyone with any experience programming any mcu.
if you had tried his code and then realized that the port settings are wrong, ...
this whole thing really gets me intrigued about this chip.
here is the block diagram and it shows adc on PORTA, and pwm/spi/i2c/uart on PORTC.
if ever we ever had the problem with incorrectly configuring an "analog" port and not being able to set it low, shouldn't that problem show up on PORTA instead?
what am I missing?
now, I would really love to see how be80be did it on PORTC but managed to get PORTA to defy the datasheet.
However, you have bloated a thread with irrelevant arguments because you didn't read the data sheet or, if you did read it, you didn't understand it. If you do now understand it then your arrogance has stopped you admitting it.
I hope that in future I am able to differentiate between newbies that want to learn and those that want to waste everyones time.
However, you have bloated a thread with irrelevant arguments because you didn't read the data sheet or, if you did read it, you didn't understand it. If you do now understand it then your arrogance has stopped you admitting it.
I hope that in future I am able to differentiate between newbies that want to learn and those that want to waste everyones time.
Let's get this strait the poster has a 16f877a I did read the data sheet. I tried his code on
the chip i was using but my chip has adc on portC so I fixed the code so it would run On my chip. 3v0 posted about lata 16f don't have a latch. Now I no the code will run it has to be like Mike said and it was number 5 on his list
Millwood you can program Ok but You haven't even read what the poster has posted he didn't have any leds on portc when he first posted it looks like he was going to use all 32 I/O but here is where he said how he set up the chip.
I've only got 2.
One connected to RA0 and one connected to RD1.
Using the example hex I linked to, the LED at RA0 blinks.
Millwood you can program Ok but You haven't even read what the poster has posted he didn't have any leds on portc when he first posted it looks like he was going to use all 32 I/O but here is where he said how he set up the chip.
I thought you guys said that X=~X would work on ANY port, and you specifically said it didn't work for you on port C (of a different chip, you later clarified).
I am happy to run it on port C of your chip if you care to tell me what chip you failed to blink the leds on.
I was toggling all PORTs so that I could see something happen even if I put the led in the wrong spot.
This code works for me for toggling:
<code>
while(1){
DelayMs(500);
PORTA = ~PORTA;
PORTB = ~PORTB;
PORTC = ~PORTC;
PORTD = ~PORTD;
PORTE = ~PORTE;
}
</code>
Millwood you can program Ok but You haven't even read what the poster has posted he didn't have any leds on portc when he first posted it looks like he was going to use all 32 I/O but here is where he said how he set up the chip.
My offer to you continues: as long as you tell me which chip's port C you have trouble blinking, I am happy to write a piece of code to blink it to you, and send you the .hex file.
void main (){
ANSEL = 0; // makes PORTC digital
PORTC = 0; // Initialize PORTC
TRISC = 0; // Configure PORTC as output
while(1){
Delay_Ms(100);
PORTC = ~PORTC;
}
}
here you can watch it blink
[embed]http://www.youtube.com/v/SCpjRvNJtVQ&hl=en&fs=1&[/embed]
maybe you can figure what chip has adc on PORTC from the video have fun
Oh I forgot some thing
Pin RA4 is multiplexed with the Timer0 module clock
input to become the RA4/T0CKI pin. The RA4/T0CKI
pin is a Schmitt Trigger input and an open-drain output.
All other PORTA pins have TTL input levels and full
CMOS output drivers.