Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

C equivalent or Assembly for this PICBASIC programme

Status
Not open for further replies.

joellee

New Member
Hey guys

I've got a PICBASIC code here... but I somehow cant run MPLAB IDE (v8.36)in a way that is compatible with PICBASIC. So I'm wondering if you guys know how to convert this into C, or assembly language to load it into the chip (PIC16F877A), it is pretty short.


//basically taking in periodic serial data at 1 rate (extracting certain data, i.e. 12 words after detecting the word GPGGA)and outputting it at a diff rate, thats all this code is supposed to do - looping forever


DEFINE OSC 20


TRISB = %00000010

TX_PIN VAR PORTB.1 //define I/O pins
RX_PIN VAR PORTB.2

Loop:

SERIN 1, T4800, ("GPGGA"), W0, W1, W2, W3, W4, W5, W6, W7, W8, W9, W10, W11, W12,

SEROUT 2, T2400, W0, W1, W2, W3, W4, W5, W6, W7, W8, W9, W10, W11, W12

goto Loop

Help is greatly appreciated!!!
 
I assume you wan to output on a different port (pin) using a software UART?
 
Do you already have PICBASIC? If so then simply compile the code in PICBASIC and using the IMPORT option under FILE in MPLAB import the generated hex file and burn it to the chip.
 
i was looking to download PICBASIC on melabs, but it costs money. and so i try to get PICBASIC demo, a lot of things were working well - until all sorts of problems like having issues with the register32, not being able to locate plugins, etc.

I tried to search for error code on google, but it doesn't quite get solved. As of now, I am not quite sure if the above programme is working; if it doesn, then at least i can ask for help from some good samaritan who would help me paste the converted code here so i will just copy and paste.

I have mplab 8.36, and some programmers that come along with it. but currently im stuck in this situation.

btw mikereynolds, are you saying that if someone can confirm if the code is working: then i can jsut import the file in mplab and they will automatically make it assembly language?

Thanks for the help!
 
PicBasic will not work with mplab newer then 8.15a so if you want to use it with Mplab
you have to download 8.15a and use it
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top