Content originally posted in LPCWare by MikeSimmonds on Mon Jan 28 18:08:24 MST 2013
[FONT=Trebuchet MS][SIZE=2]Sorry to have to break it to to, but you are screwed.
This is a fact of life; no amount of "they should have" or
"they could have" is going to change the way a micro works.
All the micro controllers I have ever worked with adopt this strategy -- NXP, Atmel, ST,
Freescale (formerly Motorola), Hitachi, etc. do this. It is a defacto industry standard.
It may sound harsh, but you should always read, read, read, and read all documentation (user manuals, datasheets, app notes) over and over before you design hardware.
Going in blind has consequences as you found out the hard (expensive?) way.
I know that's easy to say, and occaisionally (even now) some gotcha trips me up.
I'm guessing from your post count, that you are new to this -- so treat this as a valuable
lesson learned. I doubt you will make [I]that[/I] mistake ever again.
If this is not the case, I can only say (respectfully) that you should have expected this.
For example: your LED's should be connected the other way round: Vcc to limit resistor to LED to port pin. Then a [I]low[/I] on the pin will light the led. Again, this is the normal (industry standard) configuration.
Mike
[/SIZE][/FONT]