FMMT666 / PIC32Lua

Lua for Microchip PIC32 processors.
http://www.askrprojects.net/software/pic32lua/index.html
19 stars 6 forks source link

PIC32Lua in stand alone PCB with PIC32MX795F512. #1

Open euclas opened 9 years ago

euclas commented 9 years ago

Hello. I'm developing a stand alone PCB with PIC32MX795F512 and would like to test it with PIC32Lua. Please help me? You could send a message for me? Thank you. Euclides Franco de Rezende. euclas@gmail.com Brazil.

FMMT666 commented 9 years ago

Sure, let's get this running. For science \o/ How can I help?

euclas commented 9 years ago

Great!

Initially and if possible look at the card I sent to manufacturing and see if there is any impediment to use it along with the recorder (PICkit3).

Attached.

With this board I intend to record the firmware and start doing tests. I found the following project:

http://geoffg.net/micromite.html

The circuit is here:

http://geoffg.net/MaximiteDesign.html

The idea is to match the PIC32Lua with this circuit. Thus, besides the chipKIT-Max32 the Maximite (or other card based on it, In this case, a step beyond the PCB shown) could use Lua (much more portable and modern language) for programming.

Any comments or idea to help me?

Euclides Franco de Rezende euclas@gmail.com

2015-05-19 20:13 GMT-03:00 FMMT666 notifications@github.com:

Sure, let's get this running. For science \o/ How can I help?

— Reply to this email directly or view it on GitHub https://github.com/FMMT666/PIC32Lua/issues/1#issuecomment-103694546.

FMMT666 commented 9 years ago

As far as I can see, you don't need to change anything. Even the PIC32Lua binary should run on this.

Just remember that PIC32Lua does not yet support a virtual comm port via USB (and this will probably only get built in for the MZ version) and you'll need one of the serial interfaces.

euclas commented 9 years ago

Hi.

To program the PIC32MX795F512 is only done through the SD card?

There is no minimum circuit that can be mounted so that you can take a test?

Only using the ChipKit Max32?

Thank you.

Euclides Franco de Rezende. euclas@gmail.com

2015-05-21 19:30 GMT-03:00 FMMT666 notifications@github.com:

As far as I can see, you don't need to change anything. Even the PIC32Lua binary should run on this.

Just remember that PIC32Lua does not yet support a virtual comm port via USB (and this will probably only get built in for the MZ version) and you'll need one of the serial interfaces.

— Reply to this email directly or view it on GitHub https://github.com/FMMT666/PIC32Lua/issues/1#issuecomment-104440338.

euclas commented 9 years ago

Was this part of the circuit enough to program the firmware in the pic? (Continues after drawing).

[image: Imagem inline 1] After mounting the SD card:...

[image: Imagem inline 2]

...With the file BOOT32.LUA everything would work?

2015-05-21 20:13 GMT-03:00 Euclides Rezende euclas@gmail.com:

Hi.

To program the PIC32MX795F512 is only done through the SD card?

There is no minimum circuit that can be mounted so that you can take a test?

Only using the ChipKit Max32?

Thank you.

Euclides Franco de Rezende. euclas@gmail.com

2015-05-21 19:30 GMT-03:00 FMMT666 notifications@github.com:

As far as I can see, you don't need to change anything.

Even the PIC32Lua binary should run on this.

Just remember that PIC32Lua does not yet support a virtual comm port via USB (and this will probably only get built in for the MZ version) and you'll need one of the serial interfaces.

— Reply to this email directly or view it on GitHub https://github.com/FMMT666/PIC32Lua/issues/1#issuecomment-104440338.

FMMT666 commented 9 years ago

No, the firmware can not be just loaded via an SD-card.

Unless the PIC32 is preprogrammed with a bootloader, like the Chipkit-MAX32, for example, you'll need a programmer. Also notice that different bootloaders might differ in size, so the linker script needs to be adjusted.

euclas commented 9 years ago

Yes. I understood that the Bootloader is programmed by ICSP. And the program in Lua is loaded via the SD card containing the BOOT32.LUA script. Correct?

2015-05-22 18:46 GMT-03:00 FMMT666 notifications@github.com:

No, the firmware can not be just loaded via an SD-card.

Unless the PIC32 is preprogrammed with a bootloader, like the Chipkit-MAX32, for example, you'll need a programmer. Also notice that different bootloaders might differ in size, so the linker script needs to be adjusted.

— Reply to this email directly or view it on GitHub https://github.com/FMMT666/PIC32Lua/issues/1#issuecomment-104783591.

FMMT666 commented 9 years ago

PIC32Lua operates like a standard "desktop" Lua that is running in a console. What you type in your serial terminal application is interpreted immediately and you copy and paste lua code into the interpreter, e.g. as function snippets.

To start a file from SD-Card, use dofile(), loadfile(), e.g., see http://luatut.com/dofile.html

The 'BOOT32.LUA' file is only required if you what to execute Lua code right after you turned on your device, just like an "autoexec.bat" did on DOS machines.

euclas commented 9 years ago

Hi.

I am in Brazil, I made contact with Professor Roberto Ierusalimschy (creator of the language). I wonder if you know any Brazilian who is using PIC32LUA? Thereby see support those already using to help me in my project.

Thank you.

Euclides.

2015-05-23 9:09 GMT-03:00 FMMT666 notifications@github.com:

PIC32Lua operates like a standard "desktop" Lua that is running in a console. What you type in your serial terminal application is interpreted immediately and you copy and paste lua code into the interpreter, e.g. as function snippets.

To start a file from SD-Card, use dofile(), loadfile(), e.g., see http://luatut.com/dofile.html

The 'BOOT32.LUA' file is only required if you what to execute Lua code right after you turned on your device, just like an "autoexec.bat" did on DOS machines.

— Reply to this email directly or view it on GitHub https://github.com/FMMT666/PIC32Lua/issues/1#issuecomment-104885517.

FMMT666 commented 9 years ago

No, sorry. Except for a few, I don't know where they live...

Indeed, I am still not sure what your major issues are... Is it that you don't know how to program the PIC or how to use PIC32Lua with that board?

euclas commented 9 years ago

Hi.

At first my problem is to make the PIC32LUA be installed on the board, but do not want to use the PICkit 32. I want to develop my card because my intention is that this card becomes a product or part of a product. Building on its software. There is no design of a PCB on the blog, so I think it will be as an open question. So I intend to design a PCB which also could be an option, less costly to acquire. In this way it would be easier for me to know if anyone here in Brazil have used the PIC32LUA so we can share experiences. Thank you for your attention.

Euclides.

2015-05-28 16:29 GMT-03:00 FMMT666 notifications@github.com:

No, sorry. Except for a few, I don't know where they live...

Indeed, I am still not sure what your major issues are... Is it that you don't know how to program the PIC or how to use PIC32Lua with that board?

— Reply to this email directly or view it on GitHub https://github.com/FMMT666/PIC32Lua/issues/1#issuecomment-106573774.

euclas commented 9 years ago

I'm sorry. I did not show the card I sent you to prototype manufacture the plate I want to finally draw. All pins are available to do tests. Except the power that is all concentrated in two pins.

[image: Imagem inline 1]

The programming pins are as follows: 26 - PGEC2, 27 - PGED2 as yet set up the other components. If you knew somebody else who made a similar assembly would be easier for me to identify problems.

Thank you.

Euclides.

2015-05-28 16:51 GMT-03:00 Euclides Rezende euclas@gmail.com:

Hi.

At first my problem is to make the PIC32LUA be installed on the board, but do not want to use the PICkit 32. I want to develop my card because my intention is that this card becomes a product or part of a product. Building on its software. There is no design of a PCB on the blog, so I think it will be as an open question. So I intend to design a PCB which also could be an option, less costly to acquire. In this way it would be easier for me to know if anyone here in Brazil have used the PIC32LUA so we can share experiences. Thank you for your attention.

Euclides.

2015-05-28 16:29 GMT-03:00 FMMT666 notifications@github.com:

No, sorry.

Except for a few, I don't know where they live...

Indeed, I am still not sure what your major issues are... Is it that you don't know how to program the PIC or how to use PIC32Lua with that board?

— Reply to this email directly or view it on GitHub https://github.com/FMMT666/PIC32Lua/issues/1#issuecomment-106573774.

FMMT666 commented 9 years ago

Sorry, I don't see any image(s) there... Could you upload it somewhere?

A minimum PIC32 configuration only requires nothing else but a power supply, pull-up of MCLR, an oscillator and the connections to the programmer... In addition you'll need a serial connection to your PC (FTDI, MCP2200, CP21xx, ...).

Maybe I'll create a minimum schematic/layout next weekend, if I manage to find some time...

FMMT666 commented 9 years ago

Here, just found this: http://eprojects.ljcv.net/2011/10/yet-another-pic32-proto-board.html Maybe this helps a little...

euclas commented 9 years ago

Can you see?: http://labdegaragem.com/photo/placa-adaptadora-para-pic32mx795f512

I drew in Eagle and sent to manufacturing. I plan to use it to mount on another plate like a big integrated circuit. I will use this other PCB to start making the prototype.

2015-05-28 18:46 GMT-03:00 FMMT666 notifications@github.com:

Sorry, I don't see any image(s) there... Could you upload it somewhere?

A minimum PIC32 configuration only requires nothing else but a power supply, pull-up of MCLR, an oscillator and the connections to the programmer... In addition you'll need a serial connection to your PC (FTDI, MCP2200, CP21xx, ...).

Maybe I'll create a minimum schematic/layout next weekend, if I manage to find some time...

— Reply to this email directly or view it on GitHub https://github.com/FMMT666/PIC32Lua/issues/1#issuecomment-106609824.

euclas commented 9 years ago

I will study this text and see what it would take. I intend to use the pins 26 and 27 for programming (ICSP directly linked to), there is some problem about it? Have you used these pins to it?

Thank you.

Euclides.

2015-05-28 18:48 GMT-03:00 FMMT666 notifications@github.com:

Here, just found this: http://eprojects.ljcv.net/2011/10/yet-another-pic32-proto-board.html Maybe this helps a little...

— Reply to this email directly or view it on GitHub https://github.com/FMMT666/PIC32Lua/issues/1#issuecomment-106610434.

euclas commented 9 years ago

I bought a PCB like that (China), but the pitch between the pins is 0.5 mm. I had to have manufactured this especially for this operation (learn how to use Eagle software). Unfortunately it one step at a time.

2015-05-28 19:03 GMT-03:00 Euclides Rezende euclas@gmail.com:

I will study this text and see what it would take. I intend to use the pins 26 and 27 for programming (ICSP directly linked to), there is some problem about it? Have you used these pins to it?

Thank you.

Euclides.

2015-05-28 18:48 GMT-03:00 FMMT666 notifications@github.com:

Here, just found this:

http://eprojects.ljcv.net/2011/10/yet-another-pic32-proto-board.html Maybe this helps a little...

— Reply to this email directly or view it on GitHub https://github.com/FMMT666/PIC32Lua/issues/1#issuecomment-106610434.

FMMT666 commented 9 years ago

You can use any of the PGECx/PGEDx pin pairs. Only make sure that you are using the pins of the same pair. Yes, you can directly attach your programmer to these pins. You'll also need MCLR and a pull-up resistor. Watch out for "big" (>1nF ;-) capacitors at MCLR. Those will cause problems...