Mikroc Library functions for PIC12f683

Status
Not open for further replies.

imranahmed

Advanced Member level 3
Joined
Dec 4, 2011
Messages
817
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
6,492
This code is compiled successfully but the data do not send out in serial LCD or Virtual Terminal.
 

Attachments

  • OW.txt
    136 bytes · Views: 52

This is your code:
Code:
void main()
{
ANSEL=0;
CMCON0=0;
CMCON1=0;
TRISIO=0;

 T1CON=0;
 T2CON=0;
 IOC=0;
while(1)
{
Ow_Write(&GPIO,0,0x41);
}

}

You used the One-Wire Protocol.

Can you upload your schematic?

You can't send data directly to Virtual Terminal with One-Wire Protocol. You need to use RS232 (UART).

To send data to LCD or Virtual Terminal via One-Wire Protocol, you'll need some chip that "converts" the data sent through One-Wire to something suitable for sending to LCD or Virtual Terminal.

Hope this helps.
Tahmid.
 
Attached schematic of One-Wire Protocol.
I learn in OW datasheet that OW-Protocol uses Pulse Width Modulation method thats why is not showing data in LCD or Virtual Terminal.
 

Attachments

  • OWSCH.bmp
    2.3 MB · Views: 41
  • One-Wire-Protocol.pdf
    136.8 KB · Views: 101

It's a part of this simplified rs232 interface circuit, it will be charged to a negative voltage (via the diode) using the PC side TX (3) pin idle state (-8 ... -12v), and used as a negative power supply for the PC side RX (2) pin via the 4k7, so if the BC557 is on then the PC side pin 2 will be +5v, else appr -7 v. Cheaper than a max232
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…