LPC812 - HVAC controller - eval chip

Post details of your projects here.
RickDavis
Posts: 1
Joined: Fri Nov 07, 2014 6:35 am
Location: San Antonio, TX
Contact:

Re: LPC812 - HVAC controller - eval chip

Post by RickDavis »

I am considering using the 812 as an event logger. - I think I ran out of pins for my (mini)HVAC controller
BUT I am missing IO(18) that the SuperPro uses to write to the SDcard.
see pinout picture in FILEOPEN



olzeke51
Posts: 414
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: LPC812 - HVAC controller - eval chip

Post by olzeke51 »

Well, the 812 doesn't have the file operations built into it. It would have to be created by you.
the Vdrive unit - which is serial to usb adapter for a usb drive(aka thumbdrive) could possibly be used.
search the Forum for 'vdrive' and you might get some clues and Basic code for serial.
You might be able to translate the serial to an I2C or SPI protocol, - but it's all on you - as none of this
is in the 812 Basic, nor many of the others. Adafruit has an RTC/SDcard shield for the Arduino that might
work. the SD is run via SPI, the RTC is run on I2C. Again - you would assign pins to the devices inside of
your BAsic.
'
NOw - as long as the SPI CS pin is not enabled - you could use some of the other pins DO/DI on a double
duty basis. Collect your inputs , then switch them to ouput to the SDcard or vice versa. - the SPI device
should ignore everything if is doesn't have the CS enable signal.
'
Watch your 5v and 3.3v levels !!!, and the 812 can only supply about 75ma max at 3.3v -- overload the zener!!
5ma is for the 812 so you only have 65-70ma MAX. (personally I would not use it as a main power source,
just a signal source) - I'm old school and tend to be cautious with my power draw on devices.
'
Hope this gives you a direction to go, good luck & watch your p's and q's. Gary

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: LPC812 - HVAC controller - eval chip

Post by basicchip »

The 812 only has 16K, and the firmware to include both floating point and file operations is about 16K, so it would not have any room for a user program.

We have published firmware on the Teensy that includes FILE operations, and will be announcing an LPC4330 based board that has it as well.

olzeke51
Posts: 414
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: LPC812 - HVAC controller - eval chip

Post by olzeke51 »

"I'm not dead yet!! - the 812 is out of the picture !!! I am switching to the
Pro-Start board. I purchased two (arduino) shields from RadioShack recently - one was a
relay shield (by SeeedStudio) v1.0 - and the other was an I/O type of shield (also SeeedStudio).
'
The relay board has 4 relays - opto isolated controlled. There are NO indicator LEDs for status.
There is an onboar 5v regulator, Xbee socket, and also a remote control socket for another
SeeedStudio product. - Now the newer V2 has indicator LEDs but not the other stuff. I kind of
wanted to have a manual control of the relays also, so the remote control socket will come in handy.
The onboard 5v and 3.3v regulators are isolated from the arduino pins!! The opto-isolated chip is
tied to 5v so I need to work on level translation -- the Pro Chip is 5v tolerant for inputs, but the
outputs have a 4 ma max limit per pin, per what I read from NXP's datasheet.
'
The IO shield was supposed to have a horizontal, side-mounted pot. It looks like they had a 'standard'
packet of components and threw it in. I even had a bi-color LED and some tall header pin strips.
I needed some room for future parts so I soldered the sockets to the header pins for more room.
Lousy solder job - don't get old OR use big solder !!! .050 dia was too big - lots of bridging!!
Now I can get to a 'Reset' button
'
My plans are to mount it in a 4-gang electrical box. Its long enough for a wall wart, the boards and
at least one 110v outlet.
'
relay shield, proto shield, ProStart
relay shield, proto shield, ProStart
3_boards.JPG (185.43 KiB) Viewed 30163 times
Last edited by olzeke51 on Sat Nov 22, 2014 3:22 pm, edited 1 time in total.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: LPC812 - HVAC controller - eval chip

Post by basicchip »

Yep, ask NXP why they put analog lines on the ISP pins. But they still can be used, just today I was using the comparator on the LPC812 to detect a 50mV signal. Ended up using the BOOT pin as the input (with a weak pullup) so that BASIC programs could still be loaded in. Also running the part at 1.8V in this case. Typical flywire setup, using a wirewrap type pin extender/diverter in this case.
flywire.jpg
flywire.jpg (37.18 KiB) Viewed 30183 times

olzeke51
Posts: 414
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: LPC812 - HVAC controller - eval chip

Post by olzeke51 »

Short note -- went back to the 812 - had to do too many rewires on the
I/O shield for the relay shield
'
Will now stack the relay shield right on top of the 812 that I showed earlier.
that way I only have to wire once !!!
about 70% done on the S/W. used up 3k of my 4k flash

olzeke51

olzeke51
Posts: 414
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: LPC812 - HVAC controller - eval chip

Post by olzeke51 »

program STOP command not working
'
BT (5.37) per the BT help/about menu
[was using armbasic.exe 9-10-14 AKA 9.34E]
LOADED UP ARMbasic9.34h 12-02-2014
same dongle and USB port
******* manually entered program
dim var as single
var = 1951.41
print var
print "stop command"
STOP
print "done with stop"
end
**********BASICCHIP
Welcome to ARMbasic Kernel[8.34a] with Floating Point Copyright 2014, Coridium Corp.
for the BASICchip

/////// ******* manually entered program here
Programming Flash 1114...
ARMbasic[9.34h] on the PC Copyright 2014, Coridium Corp.
*+*+
... ( 0.06K code + 0.03K const)/20K 0.01/2K data programmed
Executing...

1951.410
stop command

Break:

@ hex [yy] - dump at hex yy words
! hex yy - write yy to hex
^ to run^

done with stop


... Finished in 63489 ms ////////******* notice - time for me to look at BT-variable window
************************812 chip
Welcome to ARMbasic Kernel[8.33a] with Floating Point Copyright 2014, Coridium Corp.
for LPC800 family

//// entered the program manually here
Programming Flash 0812...
ARMbasic[9.34h] on the PC Copyright 2014, Coridium Corp.
*+*+
... ( 0.06K code + 0.03K const)/4K 0.01/1K data programmed
Executing...

1951.410
stop command

Break:

@ hex [yy] - dump at hex yy words
! hex yy - write yy to hex
^ to run
down with stop


... Finished in 2 ms ////////****** notice 2ms - no opportunity to type

olzeke51
Posts: 414
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: LPC812 - HVAC controller - eval chip

Post by olzeke51 »

I thought the 812 had 2K of user ram per a pre-release web-page ?????
'
print " down with stop"
end
Programming Flash 0812...
ARMbasic[9.34h] on the PC Copyright 2014, Coridium Corp.
*+*+
... ( 0.06K code + 0.03K const)/4K 0.01/1K data programmed
Executing...

1951.410

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: LPC812 - HVAC controller - eval chip

Post by basicchip »

The present compiler deals in 1K blocks for space available (that's 1024 bytes). And it doesn't round, though it probably should. In the case of code that is always a multiple of 1K, but for data in the 812 it is 2000 bytes available and that gets truncated to 1K

The overhead includes 512 bytes for stack, 512 bytes for Flash memory write support, 256 bytes for string processing, and assorted other for the firmware.

------------------------------

A simpler fix is to allocate 512 words in the LPC812, which brings it up to 2K. I'll just have to remember this if we ever do another really small ARM port.

olzeke51
Posts: 414
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: LPC812 - HVAC controller - eval chip

Post by olzeke51 »

GETTIN' CLOSER!
not_assy.JPG
not_assy.JPG (116.96 KiB) Viewed 30008 times
sort_of_assy.JPG
sort_of_assy.JPG (58.71 KiB) Viewed 30008 times
Real world connections are something else !!
lines on a paper are much easier........

Post Reply