CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Electronics > Computers and Networking


Computers and Networking Discuss computer and Networking related questions here!


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 07-16-2005, 07:52 PM
j m j m is offline
 
Join Date: Jun 2005
Location: uk
Posts: 62
j m is on a distinguished road
rs232\serial port (Voltage)

I am having trouble using a pic programmer. post

And want to rule out the serial port. From what I understand there are different types that use different voltages 5volts ~ 12volts and what to know how to tell the difference.

I have bean searching and searching for info for the command for the serial port in QBasic. Similar to the parallel portOUT,888 1 will give you the high voltage over pins 2, 25.

I thought this would be an easy thing to find. I was wrong!! I’ve found loads of beginners guides, and lots of people getting LEDs to flash with the parallel port but absolutely nothing on the serial port.
I did find some commands for it in a Linux, but my only experience of using Linux is knoppix which is a bootable Live system on CD so had some trouble understanding it.
I also found some info for c but as i have never used it before, Perhaps I should start as it’s a proper programming langue, but I like my basic as that was my first contact I ever had with a computer which was a bbc .



Just a trip down memory lane.

If you can help please do
Thank you jm
Tweet this Post!Share on Facebook
Reply With Quote

  #2  
Old 07-16-2005, 10:41 PM
*Registered*
 
Join Date: Mar 2003
Posts: 45
pmurray is on a distinguished road
jm,

Well I can tell you what to look for on the serial port (DP-9) connector on the back of your computer if it is a fairly recent PC.

If it uses true RS-232 levels you should see somewhere between -8 to -12 VDC between Pin 3 (TX) and Pin 5 (GND) while not transmitting. While transmitting, the TX pin will swing between a negative voltage (-8 to -12 VDC) and a positive voltage (8 to 12 VDC) depending on if the bit it is sending is a “mark” or a “space” (1’s & 0’s talk for the asynchronous type protocol used with RS-232). If using a volt meter to read while transmitting, the display will stutter, probably around 0 VDC.

A quick test to see if the port is working is to start a terminal program (if you have a PC running a Windows OS, you can use Hyper Terminal – it comes with the OS). Set the terminal program to use the serial port in question (baud rate, parity, stop bit, etc. are not important for this test). Short pins 2 and 3 together on the DB-9 connector (same pins if it is a DB-25 connector). Hit some character keys on the keyboard and see if they are echoed (displayed) back to the screen.

Hope this helps. . .

plm
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 07-17-2005, 06:05 AM
j m j m is offline
 
Join Date: Jun 2005
Location: uk
Posts: 62
j m is on a distinguished road
hi pmurray
thanks for the info I think I’ve found my problem.
abasir and smarbaga told me similar but I wanted to make shore
I am using my old laptop running win95
somewhere between -8 to -12 VDC between Pin 3 (TX) and Pin 5 (GND)
I am only getting 0.65volts. I tried restarting in dos but it was still just 0.65volts and I also tried resetting the bios setting but this also made no difference. So I think its blown.
I wanted to get a desktop eventually to use for cnc anyway, so this has made it a bit more of a priority, and a PCI I/O Expansion card so I don’t have to use the ports on the mother board.

Thanks jm

Just out of interest if any one does know the serial port address in basic, or if you cant use it. please let me know as It has started to bug me that I couldn’t find out. I had a idea that it could be (out,232) as in rs232, but as my serial port doesn’t seam to be working so I don’t know.
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 07-17-2005, 08:52 AM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road
050717-0730 EST USA

jm:

Use "The Programmers PC Sourcebook" by Thom Hogan as a source of addresses. Or go to the original IBM Technical Reference manuals.

Use the reference book "Microsoft QuickBasic" for DOS 4.5, the File and Device I/O chapter, p120-121, for some of your information.

Use DEBUG and write some simple 8086 instructions to probe the serial port.

My Sony laptop disables all RS232 lines when inactive. My old Toshiba laptop has relative to pin 5 (logic common) -9.2 on pins 3, 4, and 7 at rest. The inputs are 0 v.

Note: the UART does not directly connect to the RS232 connector, but drives one or more interface chips, such as 1488, that do level conversion from/to TTL and RS232.

.
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 08-04-2005, 08:15 AM
 
Join Date: Aug 2005
Location: U.S.A
Posts: 52
Megahertz is on a distinguished road
On most computer, the address for the COMM1 serial port is 3F8 hex or 1016 decimal. I believe the syntax to use the OUT command in QBasic is OUT (Address), (1 Byte Data) Try using...

OUT 3F8h, 85 should send a 01010101 (toggle bit) out your RS232 port.

~~~~~~~~~~~~~~~~~~~~~
Connect pin 2 and 3 on your COMM port (your making a loop-back plug) to verify to comm port is working. You cannot accuratly measure the voltage levels of you comm port with a digital multimeter.
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 08-05-2005, 08:43 AM
j m j m is offline
 
Join Date: Jun 2005
Location: uk
Posts: 62
j m is on a distinguished road
Thanks for the replies I spent a bit of time rummaging in the garage looking for my old computer books a after a couple of hours I found them, and it’s just a single garage so you get an idea of how much stuff is in it. Well I found [how to interface Pc’s] and If any body else wants to know it gives the four serial port base addresses as
  1. PORT BASE ADDRESS IRQ
    ONE 3F8 4
    TWO 2F8 3
    THREE 3E8 4
    FOUR 2E8 3
Originally Posted by Megahertz
OUT 3F8h, 85 should send a 01010101
that look right to me, going on what’s in the book. I’ll have to try and give it a go some time when I get around to getting a old (new to me) computer.
jm
Tweet this Post!Share on Facebook
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 02:55 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353