0% found this document useful (0 votes)
34 views11 pages

Wall Panting System

The document describes an automatic wall painting system controlled by a microcontroller. It initializes an LCD display and sets ports for motor control. It then enters a loop where it displays messages on the LCD like "FORWARD" or "REVERSE" and controls motors in either direction depending on sensor input until the loop is exited.

Uploaded by

ankush belkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views11 pages

Wall Panting System

The document describes an automatic wall painting system controlled by a microcontroller. It initializes an LCD display and sets ports for motor control. It then enters a loop where it displays messages on the LCD like "FORWARD" or "REVERSE" and controls motors in either direction depending on sensor input until the loop is exited.

Uploaded by

ankush belkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Wall panting system

Define LCD_LINES = 2
Define LCD_CHARS = 16
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 4
Define LCD_RSREG = PORTB
Define LCD_RSBIT = 2
Define LCD_EREG = PORTB
Define LCD_EBIT = 3

TRISC = %11111111
TRISD = 0
PORTD = 0

Lcdinit LcdCurUnderline
Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING SYSTEM "
WaitMs 3000

loop:

Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING FORWARD "
'WaitMs 1000
If PORTC.0 = 1 Then
PORTD.1 = 1
PORTD.7 = 0
Else
PORTD.1 = 0
PORTD.7 = 1
WaitMs 5000

Endif

Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING REVERSE "
WaitMs 1000
If PORTC.1 = 1 Then
PORTD.1 = 0
PORTD.7 = 1

Else
PORTD.1 = 1
PORTD.7 = 0
WaitMs 5000
Endif

Goto loop

Define LCD_LINES = 2
Define LCD_CHARS = 16
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 4
Define LCD_RSREG = PORTB
Define LCD_RSBIT = 2
Define LCD_EREG = PORTB
Define LCD_EBIT = 3

TRISC = %11111111
TRISD = 0
PORTD = 0

Lcdinit LcdCurUnderline
Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING SYSTEM "
WaitMs 3000

loop:

Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING FORWARD "
'WaitMs 1000
If PORTC.0 = 1 Then
PORTD.1 = 1
PORTD.7 = 0

Else
PORTD.1 = 0
PORTD.7 = 1
WaitMs 5000

Endif

Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING REVERSE "
WaitMs 1000
If PORTC.1 = 1 Then
PORTD.1 = 0
PORTD.7 = 1

Else
PORTD.1 = 1
PORTD.7 = 0
WaitMs 5000
Endif

Goto loop

Define LCD_LINES = 2
Define LCD_CHARS = 16
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 4
Define LCD_RSREG = PORTB
Define LCD_RSBIT = 2
Define LCD_EREG = PORTB
Define LCD_EBIT = 3

TRISC = %11111111
TRISD = 0
PORTD = 0

Lcdinit LcdCurUnderline
Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING SYSTEM "
WaitMs 3000

loop:
Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING FORWARD "
'WaitMs 1000
If PORTC.0 = 1 Then
PORTD.1 = 1
PORTD.7 = 0

Else
PORTD.1 = 0
PORTD.7 = 1
WaitMs 5000

Endif

Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING REVERSE "
WaitMs 1000
If PORTC.1 = 1 Then
PORTD.1 = 0
PORTD.7 = 1

Else
PORTD.1 = 1
PORTD.7 = 0
WaitMs 5000
Endif

Goto loop

Define LCD_LINES = 2
Define LCD_CHARS = 16
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 4
Define LCD_RSREG = PORTB
Define LCD_RSBIT = 2
Define LCD_EREG = PORTB
Define LCD_EBIT = 3

TRISC = %11111111
TRISD = 0
PORTD = 0

Lcdinit LcdCurUnderline
Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING SYSTEM "
WaitMs 3000

loop:

Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING FORWARD "
'WaitMs 1000
If PORTC.0 = 1 Then
PORTD.1 = 1
PORTD.7 = 0

Else
PORTD.1 = 0
PORTD.7 = 1
WaitMs 5000

Endif

Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING REVERSE "
WaitMs 1000
If PORTC.1 = 1 Then
PORTD.1 = 0
PORTD.7 = 1

Else
PORTD.1 = 1
PORTD.7 = 0
WaitMs 5000
Endif

Goto loop

Define LCD_LINES = 2
Define LCD_CHARS = 16
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 4
Define LCD_RSREG = PORTB
Define LCD_RSBIT = 2
Define LCD_EREG = PORTB
Define LCD_EBIT = 3

TRISC = %11111111
TRISD = 0
PORTD = 0
Lcdinit LcdCurUnderline
Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING SYSTEM "
WaitMs 3000

loop:

Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING FORWARD "
'WaitMs 1000
If PORTC.0 = 1 Then
PORTD.1 = 1
PORTD.7 = 0

Else
PORTD.1 = 0
PORTD.7 = 1
WaitMs 5000

Endif

Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"
Lcdcmdout LcdLine2Home
Lcdout "PAINTING REVERSE "
WaitMs 1000
If PORTC.1 = 1 Then
PORTD.1 = 0
PORTD.7 = 1

Else
PORTD.1 = 1
PORTD.7 = 0
WaitMs 5000
Endif

Goto loop

Define LCD_LINES = 2
Define LCD_CHARS = 16
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 4
Define LCD_RSREG = PORTB
Define LCD_RSBIT = 2
Define LCD_EREG = PORTB
Define LCD_EBIT = 3

TRISC = %11111111
TRISD = 0
PORTD = 0

Lcdinit LcdCurUnderline
Lcdcmdout LcdClear
Lcdcmdout LcdLine1Home
Lcdout "AUTOMATIC WALL"

You might also like