Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Hello world - output to hardware (led)

Status
Not open for further replies.

Inquisitive

Super Moderator
How many programming languages can we represent on this forum saying "hello world". In this version you must turn on a LED, show your code (clearly state whichever language you chose and version) and provide a schematic clearly displaying the type of chip, resistor values, power supply voltage.

Interested in showing us for example a 8051 turning on a LED in a functioning circuit?
 
You posted this in the wrong place

I posted in Code Repository because the intent was to cover all microcontrollers. We did not have a all micro controllers inclusive thread. I thought this the best compromise. Sorry if it does not fit. I stand to be corrected or thread moved as seen fit.
 
Hello_World.jpg

This is the the 'code' for Hello World when using the VPS graphical language. I added the gate to make it more interesting. As the trace view shows now you can stop and start the LED flashing with the A_Switch signal. The 2nd figure in the hardware was used for this particular application.

What happened to the other coders on this forum?
 

Attachments

  • VPS_P18_BasicHardware.pdf
    240 KB · Views: 444
The picture is the program (although in this case it is just a screen shot). To be precise - the program/project is a script file generated and interpreted by a graphical IDE that produces the .hex file. Download links for the VPS ide you can find in this forum under Microcontrollers. See the thread Diagramatic programming for pic of 11 Oct.
 
Thanks for the explanation.
 
Here is my "Hello Led" for Attiny13
- Package: 8-PDIP or 8-SOIC
- Compiler: avr-gcc 4.8
- Language: C

schematic-300x136.png


C:
void main(void)
{
    /* Port B pin 3 as output */
    *((char*)(0x17)) = 0b00001000;

    /* Port B pin 3 high */
    *((char*)(0x18)) = 0b00001000;

    /* Infinite loop */
    for(;;){}
}
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top