When you post code, use the Advanced options, you can use the Code icon (looks like #) to post so it looks like this:
You can name variables any name you want, as long as you don't use reserved names (check the manual for naming conventions and reserved names).Code:TRISB = %00001000 SIG1 = GPIO.3 OUTPUT1 = GPIO.1 OUTPUT2 = GPIO.2 LOOP: OUTPUT1 = SIG1 OUTPUT2= 0 PAUSE 200 OUTPUT1 = 0 OUTPUT2 = SIG1 PAUSE 200 GOTO LOOP
Spacing is irrelevant as long as you don't break up words.
Comments are optional, but they will help you remember what you are doing, and others go through your code.
If you post in WYSIWYG format, your code gets messed up, ie: you lose leading % on bits. Hover your mouse over the big A icon, you want to be in Source mode.
I don't understand the part about alternating a negative ground signal. As explained, your best bet would be to post a schematic of the components you are using and how you plan to wire them up.
Robert




Bookmarks