Hello Dudes.a few month ago i bought one HY-LPC1788-CoreBoard (Gold Color!) And I started to using it in my project.Fortunately,I Could run the LCD,Touch & USART and THE RED LED on the LPC1788.But If i change the PORT and PIN it don't work. for example when i choose the on board led (P2.21) its working good and after that when i change the port (for example change P2.21 to P3.21 OR P2.21 to P0.21) it is not working. What is wrong with this LPC1788-CoreBoard !?? and this is my code.... 0up.ir/do.php Tanx.
Hello again and thank you for your Help. yes i read the "UM10470" first . Pin 81 is P2.21 [on Board Red LED] pin 195 is p3.22 this is my code ....
int main(void) { PINSEL_ConfigPin(0,21,0); PINSEL_ConfigPin(2,21,0); //on Board red LED PINSEL_ConfigPin(3,17,0); PINSEL_ConfigPin(3,21,0); PINSEL_ConfigPin(2,15,0); GPIO_SetDir ( 0 , (1<<21) , 1) ; GPIO_SetDir ( 2 , (1<<21) , 1) ; //on Board red LED GPIO_SetDir ( 3 , (1<<17) , 1) ; GPIO_SetDir ( 3 , (1<<21) , 1) ; GPIO_SetDir ( 2 , (1<<15) , 1) ; while(1) { FIO_SetValue( 0 , (1<<21)); FIO_SetValue( 2 , (1<<21)); //on Board red LED FIO_SetValue( 3 , (1<<17)); FIO_SetValue( 3 , (1<<21)); FIO_SetValue( 2 , (1<<15)); Delay(0xfffff); FIO_ClearValue( 0 ,(1<< 21) ) ; FIO_ClearValue( 2 ,(1<< 21) ) ; //on Board red LED FIO_ClearValue( 3 ,(1<< 17) ) ; FIO_ClearValue( 3 ,(1<< 21) ) ; FIO_ClearValue( 2 ,(1<< 15) ) ; Delay(0xfffff); }; }
. P2.15 Blinking P2.21 Blinking P0.21 Remain High without any change P3.17 Remain Low without any change P3.21 Remain High without any change
But you still haven't posted any indication that you have read the schematics and verified if there are external hardware connected to "problematic" pins.
The photos of the board linked above - which you haven't confirmed is the correct board - shows headers for P1 and P2. But I don't see any headers for P0 or P3. Only by reading the schematics would you know if the board manufacturer intends you to be able to play with the pins you are having troubles with. I notified you about this in my first post - but all you have returned back with is defending the use of the pin that controls the red LED - a pin that you do not have problems with...
Dear per westermark,sorry and thank you for your attention. I'm using HY-LPC1788-CoreBoard Link www.hotmcu.com/hylpc1788core-p-40.html The photos of the board linked above - which you haven't confirmed is the correct board - shows headers for P1 and P2. But I don't see any headers for P0 or P3... I Think in the schematic The P1 and P2 are the name of the connectors and not the name of the ports if you want the reference please look at this document of LPC1788 " elty.pl/.../HY-LPC1788-Core_SCH.pdf " and this is colorful pin out :) the LED1 [PTA34] is the P2.21 OnBoard LED developer.mbed.org/.../hy-lpc1788-core_pinout_for_mbed.png
HY-LPC1788-Core_SCH.pdf this very useful document that i used for my project. i connected the SMD LED to my pins = p0.21 , p2.15 , p2.21 , p3.17 , p3.21 and with this code just p2.15 and p2.21 (red LED on Board) work. in debug mode: there is no differ between the Pins but only p2.15 and p2.21 work. thank you very much for your time and attention :)
I didn't see anything colliding with P0.21.
But P3.17 and P3.21 are data lines, and needed when interfacing with K4M563233G/K4M513233E. Are you really sure you should try to play with them as GPIO outputs, when they are in some situations driven by other chips? Exactly why did you select these pins to try to "blink"?
yes about the Port3 you right . according to the schematic the P3.17 and P3.21 connected to the K4M563233G But what about the P0.21 ? P0[21] — General purpose digital input/output pin see Page 92 at "UM10470". and Dude you can find P0.21 in "HY-LPC1788-Core_SCH.pdf" by searching P0.21.
looks like P0.21 is wired to pin 57 of P2 from your schematic. What test equipment are you using to see the signal on pin 57 of P2 connector. Maybe it is difficult to see the toggle using a Digital Voltage meter.
according to the code ... I Think because of similar function of P2.21 and P0.21, The blinking of the Pins can be seen by eyes and Voltmeter. I tested the code and only P2.15 and P2.21 blinking. :| * I increased the Delay time for sure.
Probe every pin that could be conceivably be 57. Or maybe all 60 pins to see if any of the pins are toggling. This is case you are miscounting or the schematic is being misread. or the schematic has a mistake.
Sounds complex, when it's so much easier to measure the voltage directly on the processor pin.
And this is best to do with an oscilloscope - it is able to clearly show if two output pins collide by showing a square wave with low amplitide but potentially very large offset. So a pin collision could result in a square wave between 2.7 and 3.3V Or between 1.2 and 3.3V or between 1.2 and 1.7V Or between 3.1 and 3.3V. It's just a question of how powerful the two fighting outputs are in relation to each other. Even if the pin is grounded or connected to VCC, there is normally enough resistance (unless the pin got directly connected to ground or power plane) to see a voltage difference when the pin "fights". And in that case it would normally also be visible on the current consumption, since a shorted GPIO pin puts up a significant fight.
Without an oscilloscope, the frequency must be reduced enough that a voltmeter will be able to correctly measure and present the voltages for both "high" and "low" even when the voltage difference is so small that it might not be obvious that there is a square wave there. So it would probably be best so go for maybe five seconds low, five seconds high, i.e. 0.1Hz.
If the processor registers have the correct values - i.e. no memory overwrite or following pin initializations overwrites the original configuration - then the datasheet for the processor will perfectly well tell exactly which port pin that gets affected by a specific action. So there will not be any reason to consider the action showing up on another pin - except that in some situations it's possible to configure the processor so that the same action can be emitted on more than one pin. More than one pin can react to the same match condition for a specific timer.