Skip to content

Commit

Permalink
documentation added
Browse files Browse the repository at this point in the history
  • Loading branch information
pranjal-joshi committed Jun 30, 2014
1 parent b18afe9 commit d43185a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Examples/ardu51_ADC_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
DAC_write(value) : AOUT (PIN 15 of the chip)
Its recommended to Add 1uF capacitor between DAC output & GND for noise elimination.
Copyright (C) 2014. Pranjal P. Joshi. <joshi.pranjal5@gmail.com>
*/

#define F_OSC 11059200 // define CPU freq.
Expand Down
2 changes: 2 additions & 0 deletions Examples/ardu51_EEPROM_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
SCL --- PIN 22 (P2.1)
WARNING ::: Never digitalWrite on PIN 21 & 22 while I2C bus is active!
Copyright (C) 2014. Pranjal P. Joshi. <joshi.pranjal5@gmail.com>
*/

#define F_OSC 11059200 // Define CPU freq.
Expand Down
2 changes: 2 additions & 0 deletions Examples/ardu51_analogWrite_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
analogWrite36(PWM_VALUE [0 - 255]) - PWM on PIN36
analogWrite35(PWM_VALUE [0 - 255]) - PWM on PIN35
analogWrite34(PWM_VALUE [0 - 255]) - PWM on PIN34
Copyright (C) 2014. Pranjal P. Joshi. <joshi.pranjal5@gmail.com>
*/

Expand Down
2 changes: 2 additions & 0 deletions Examples/ardu51_lcd_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
NOTE: You can still use remaining pins of Px.
That is Px.6 & Px.7 can be used for other applications.
LCD data won't interfere with remaining pins!
Copyright (C) 2014. Pranjal P. Joshi. <joshi.pranjal5@gmail.com>
*/

#include <arduino51.h> // basic file for Arduino51.
Expand Down
10 changes: 8 additions & 2 deletions Examples/ardu51_serial_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
// All devices having Timer 2 are supported even they are named as 8051 series. //
// For eg. The code will work on AT89S52 & NXP P89V51Rxx series controllers. //
///////////////////////////////////////////////////////////////////////////////////////
Copyright (C) 2014. Pranjal P. Joshi. <joshi.pranjal5@gmail.com>
*/

#define F_OSC 11059200 // CPU Freq. in Hz..
Expand All @@ -25,7 +27,7 @@
#include <ardu51_serial.h> // header file for serial communication

unsigned char demo = 48;
unsigned int x = 1024;
unsigned int x = 0;

void setup()
{
Expand All @@ -37,11 +39,15 @@ void loop()
serial_print("Arduino style programming on 8052.\n");
serial_println("println means print & jump to new line. no need to add '\n' at the end.");


serial_print("writing single char: ");
serial_write(demo); // sending single char value
// this will print '0' on terminal
serial_print("\n\r");

serial_print("Printing Integer: ");
serial_printInt(x); // This will print Int on terminal.. BUG SOLVED! UPDATED!!
x++;
serial_println();

delay(2000); // wait for 2 seconds n loop back.
}

0 comments on commit d43185a

Please sign in to comment.