We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
posted on 2013/02/11 02:42:41 AM CET
The PlayStation 2 controller uses some sort of serial interface (looks like SPI)
Two analog xy sticks,
Pressure sensitive Buttons
How did this get past you MikroE ?!?!?
We need a good Library !
posted on 2013/02/07 12:25:50 PM CET
Can somebody help me with example code for usage of BLED pin to dim TFT display in mikroC for mikromedia for dsPIC33EP.
How to achieve to change contrast of TFT or even turn it off.
Thank you,
Toni
posted on 2013/02/06 07:26:48 PM CET
Anybody having the mikroC program for BLDC sensored motor control using pic16f877a .
posted on 2013/02/06 03:08:42 AM CET
Hi
The code below dose work but dose not calculate the distance propply
can some kind person tell me what i am doing wrong
program MyPortB
#DEFINE OSC 20
' pic16f877
dim LCD_RS as sbit at RD2_bit
LCD_EN as sbit at RD3_bit
LCD_D4 as sbit at RD4_bit
LCD_D5 as sbit at RD5_bit
LCD_D6 as sbit at RD6_bit
LCD_D7 as sbit at RD7_bit
dim LCD_RS_Direction as sbit at TRISD2_bit
LCD_EN_Direction as sbit at TRISD3_bit
LCD_D4_Direction as sbit at TRISD4_bit
LCD_D5_Direction as sbit at TRISD5_bit
LCD_D6_Direction as sbit at TRISD6_bit
LCD_D7_Direction as sbit at TRISD7_bit
dim Triger as sbit at portb.2
dim ch as string[8]
dim number as word
main:
trisa=0
Trisb =0 ' designate portb as output (LCD is connected to portb)
trisc=0
portb=0
trisd=0
portd=0
trisb.4 =1
trisb.2=0
Lcd_Init() ' initialize (4-bit interface connection)
Lcd_Cmd(_LCD_CURSOR_OFF) ' send command to LCD (cursor off)
Lcd_Cmd(_LCD_CLEAR)
Lcd_Out(1,1,"Number")
number=00
while true '
Ow_Reset(PORTB, 4)
Triger =true '1 ' portb.2 =1
delay_us(50)
Triger =false ' 0 ' portb.2=0
number = Ow_Read(PORTB, 4)
number = number + (Ow_Read(PORTB, 4) << 8)
number = (number /2)/ 29.1
wordToStr(number, ch)
Lcd_Out(2,8,ch)
delay_us(500)
wend
' Main program
end.
posted on 2013/02/06 03:08:35 AM CET
Hi
The code below dose work but dose not calculate the distance propply
can some kind person tell me what i am doing wrong
program MyPortB
#DEFINE OSC 20
' pic16f877
dim LCD_RS as sbit at RD2_bit
LCD_EN as sbit at RD3_bit
LCD_D4 as sbit at RD4_bit
LCD_D5 as sbit at RD5_bit
LCD_D6 as sbit at RD6_bit
LCD_D7 as sbit at RD7_bit
dim LCD_RS_Direction as sbit at TRISD2_bit
LCD_EN_Direction as sbit at TRISD3_bit
LCD_D4_Direction as sbit at TRISD4_bit
LCD_D5_Direction as sbit at TRISD5_bit
LCD_D6_Direction as sbit at TRISD6_bit
LCD_D7_Direction as sbit at TRISD7_bit
dim Triger as sbit at portb.2
dim ch as string[8]
dim number as word
main:
trisa=0
Trisb =0 ' designate portb as output (LCD is connected to portb)
trisc=0
portb=0
trisd=0
portd=0
trisb.4 =1
trisb.2=0
Lcd_Init() ' initialize (4-bit interface connection)
Lcd_Cmd(_LCD_CURSOR_OFF) ' send command to LCD (cursor off)
Lcd_Cmd(_LCD_CLEAR)
Lcd_Out(1,1,"Number")
number=00
while true '
Ow_Reset(PORTB, 4)
Triger =true '1 ' portb.2 =1
delay_us(50)
Triger =false ' 0 ' portb.2=0
number = Ow_Read(PORTB, 4)
number = number + (Ow_Read(PORTB, 4) << 8)
number = (number /2)/ 29.1
wordToStr(number, ch)
Lcd_Out(2,8,ch)
delay_us(500)
wend
' Main program
end.